{"bugs":{"url":"https://github.com/ardatan/graphql-import/issues"},"dist":{"shasum":"b7cac7f6f555541673d984a3fd0daf5ef72104b9","tarball":"https://registry.npmjs.org/graphql-import/-/graphql-import-1.0.0-ca9879e.0.tgz","fileCount":13,"integrity":"sha512-yTfUjcf2Zh+cBQWtApdXRchNTUTNUw5T2ya9KnCWZ866WRpc8J8TyfKMcPTFM6dxtyD2DLmyFUwJ6EZ4mFJB7A==","signatures":[{"sig":"MEQCIBgJWm1NgRzU05+T+tMRbKmYNAEgveLUwvDGjp1skT2DAiBTMXeba/UMbQqquXLDiGInhB3UnQTUushKeyrAG05dVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZgotCRA9TVsSAnZWagAARlUP/AtrouFYRhK0NqcEaCDC\nFafVxbJmOjI5N88SUJzLJJD9cZb7ERc6/j5aUn/yQ+l5bKDQvJw+sD1rptjh\n15dJmn2eVzrh9PQ9xcx/ql6I4R4t8dGz5RBpXTaS+RtObmB5UgCCUkR0YOZ2\neuAlYYNFtbeXEALC0cROeUqdx9uObw8anM7xmCJa/F5x8tuIJmiMA0qELbxr\n8OCMBUUrgD/GiCi6EDjo1cQOgPCyw5islePBpB3THqEzDSZXWqSJ6cEyjiom\n3yTjQr06EtmCKxPb0InS7Ku+G+/FlvHw4KSta7eJo2EODR2Pkj/WCtoLonIV\n9bzfTe/F+mVjwAY6HdQLzdis9hn775+U2Vj+LB4p+8mzWzPkr1CTTfXgvG3C\nXfo6tGhnBsKQKdJs1Cv6JSFnTUCaHzjakGRUaVmmCQdM6r7GBrsCsStqxaVb\nLWsogfOgKIsLRKcrlCTlfW4fvOnu2laplEJTfykl+VTuGGgVBmUnvlURxzjA\nMqiRL1cyAsLcqwmkS4qKy34/Zp1UltuHnbjYQFN0P9yVV6xkpa807k0CzWMf\nNXsvTcaKRPfUQrVGRjCQgUGmqFU1rxSFCgPKM34eQNULxVwHJVhE87WVtAik\nFM54Mer27DbGclVDeBePFqIJfwT25ikz9qF/Lc//mkUcemcEgDAB+9lft+z4\nrwol\r\n=V2jR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.cjs.js","name":"graphql-import","module":"dist/index.esm.js","readme":"# graphql-import\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\n## Install\n\n```sh\nyarn add graphql-import@beta\n```\n\n## Usage\n\n```ts\nimport { importSchema } from 'graphql-import'\nimport { makeExecutableSchema } from 'graphql-tools'\n\nasync function start() {\n  const typeDefs = await importSchema('schema.graphql'); // or .gql or glob pattern like **/*.graphql\n  const resolvers = {};\n\n  const schema = makeExecutableSchema({ typeDefs, resolvers })\n}\n\nmain().catch(err => console.error(err));\n```\n\nAssume the following directory structure:\n\n```\n.\n├── schema.graphql\n├── posts.graphql\n└── comments.graphql\n```\n\n`schema.graphql`\n\n```graphql\n# import Post from \"posts.graphql\"\n\ntype Query {\n  posts: [Post]\n}\n```\n\n`posts.graphql`\n\n```graphql\n# import Comment from 'comments.graphql'\n\ntype Post {\n  comments: [Comment]\n  id: ID!\n  text: String!\n  tags: [String]\n}\n```\n\n`comments.graphql`\n\n```graphql\ntype Comment {\n  id: ID!\n  text: String!\n}\n```\n\nRunning `importSchema('schema.graphql')` produces the following output:\n\n```graphql\ntype Query {\n  posts: [Post]\n}\n\ntype Post {\n  comments: [Comment]\n  id: ID!\n  text: String!\n  tags: [String]\n}\n\ntype Comment {\n  id: ID!\n  text: String!\n}\n```\n\n\n## Updating from 0.7.x\nInstall the new version as in `Install` step and after that update your code as in `Usage` step because `importSchema` is not sync anymore and returns promise,. We recommend you to use `async/await` to make the migration simple.\nThe second parameter is now `options`. \nIf you want to provide preresolved type definitions as in `0.7.x`, use the method below;\nBefore\n\n```ts\nconst finalSchema = importSchema('somePointer', {\n  'mySchema': `\n      type Query {\n        foo: String\n      }\n    `\n})\n```\n\nAfter\n```ts\nconst finalSchema = await importSchema('somePointer', {\n  cache: {\n    'mySchema': {\n      rawSDL: `\n        type Query {\n          foo: String\n        }\n      `\n    }\n  }\n})\n```","gitHead":"ca9879e9a0e7f6d199b1378589e0b0a5d966bee5","license":"MIT","scripts":{"docs":"typedoc --out docs src/index.ts --hideGenerator --exclude **/*.test.ts","lint":"tslint src/**/*.ts","test":"jest --no-watchman --passWithNoTests","build":"bob","clean":"rimraf dist","prepack":"bob-update-version","prebuild":"yarn clean","docs:publish":"cp ./now.json ./docs && cd docs && now --public -f && now alias && now rm --yes --safe graphql-import & cd ..","ci:release:canary":"node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"homepage":"https://github.com/ardatan/graphql-import#readme","repository":{"url":"git+ssh://git@github.com/ardatan/graphql-import.git","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"6.13.7","description":"[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)","directories":{},"maintainers":[{"name":"ardatan","email":"ardatanrikulu@gmail.com"},{"name":"dotansimha","email":"dotansimha@gmail.com"},{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},{"name":"kbrandwijk","email":"kim.brandwijk@gmail.com"},{"name":"schickling","email":"schickling.j@gmail.com"},{"name":"timsuchanek","email":"tim.suchanek@gmail.com"},{"name":"urigo","email":"uri.goldshtein@gmail.com"}],"sideEffects":false,"_nodeVersion":"13.10.1","buildOptions":{"input":"./src/index.ts"},"dependencies":{"@graphql-toolkit/core":"0.9.7","@graphql-toolkit/git-loader":"0.9.7","@graphql-toolkit/url-loader":"0.9.7","@graphql-toolkit/github-loader":"0.9.7","@graphql-toolkit/prisma-loader":"0.9.7","@graphql-toolkit/schema-merging":"0.9.7","@graphql-toolkit/code-file-loader":"0.9.7","@graphql-toolkit/json-file-loader":"0.9.7","@graphql-toolkit/graphql-file-loader":"0.9.7","@graphql-toolkit/apollo-engine-loader":"0.9.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.1.0","tslint":"5.20.1","graphql":"14.6.0","ts-jest":"25.2.0","typedoc":"0.16.9","typescript":"3.7.5","@types/jest":"25.1.2","@types/node":"13.7.0","@ardatan/bob":"0.2.7","@types/lodash":"4.14.149","tslint-config-standard":"9.0.0"},"peerDependencies":{"graphql":"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/graphql-import_1.0.0-ca9879e.0_1583745581191_0.5582644445218314","host":"s3://npm-registry-packages"},"_id":"graphql-import@1.0.0-ca9879e.0","version":"1.0.0-ca9879e.0"}