{"dist":{"shasum":"4ee7ae4a44f2d63b1ec6ffed500758940c97b2b1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.2-31f5e64.0.tgz","fileCount":108,"integrity":"sha512-CW83sNcJ6tck9iJh2dlUnEMxd8RfTNsH8QMDfftep7AoMqQLxH6c6ueW8EGdVkHg+NnrdrSzRXKv+4b1sNePSg==","signatures":[{"sig":"MEUCIALhuzmnowsmwlw/Rc7KUH7XgNA+GKHk/3PvCxMObPsVAiEAhjxRhlnPZTD8d4MY0QMSlotpy86ntP2Fp8HDIxnzY3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"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"},"main":"dist/index.js","name":"graphql-toolkit","author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"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","license":"MIT","scripts":{"test":"jest","build":"tsc","release":"yarn prepare-release && npm publish","prepare-release":"yarn build && yarn test","ci:release:canary":"yarn prepare-release && node bump.js && yarn publish --tag alpha"},"typings":"dist/index.d.ts","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"repository":{"url":"git@github.com:dotansimha/graphql-toolkit.git","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"description":"A set of utils for faster development of GraphQL tools","directories":{},"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","maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"dependencies":{"glob":"7.1.3","is-glob":"4.0.0","request":"2.88.0","deepmerge":"3.1.0","valid-url":"1.0.9","is-valid-path":"0.1.1","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"24.0.0","semver":"5.6.0","graphql":"14.1.1","ts-jest":"23.10.5","typescript":"3.2.4","@types/glob":"7.1.1","@types/jest":"23.3.13","@types/node":"10.12.19","graphql-tag":"2.10.1","graphql-tools":"4.0.4","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/request":"2.48.1","@types/deepmerge":"2.2.0","@types/valid-url":"1.0.2"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/graphql-toolkit_0.0.2-31f5e64.0_1548838537422_0.29050627991585154","host":"s3://npm-registry-packages"},"_id":"graphql-toolkit@0.0.2-31f5e64.0","version":"0.0.2-31f5e64.0"}