diff --git a/packages/graphql-codegen-cli/package.json b/packages/graphql-codegen-cli/package.json index ffdbaa66c1c..dc66e83130d 100644 --- a/packages/graphql-codegen-cli/package.json +++ b/packages/graphql-codegen-cli/package.json @@ -62,7 +62,7 @@ "graphql-config": "2.2.1", "graphql-import": "0.7.1", "graphql-tag-pluck": "0.6.0", - "graphql-toolkit": "0.0.5", + "graphql-toolkit": "0.1.1", "graphql-tools": "4.0.4", "indent-string": "3.2.0", "inquirer": "6.2.2", diff --git a/packages/graphql-codegen-cli/src/merge-schemas.ts b/packages/graphql-codegen-cli/src/merge-schemas.ts index b3469e410d0..be301d08bbf 100644 --- a/packages/graphql-codegen-cli/src/merge-schemas.ts +++ b/packages/graphql-codegen-cli/src/merge-schemas.ts @@ -1,14 +1,14 @@ import { GraphQLSchema, DocumentNode } from 'graphql'; -import { mergeGraphQLSchemas } from 'graphql-toolkit'; +import { mergeTypeDefs } from 'graphql-toolkit'; import { makeExecutableSchema } from 'graphql-tools'; export function mergeSchemas(schemas: Array): DocumentNode { - const schemasArr = schemas.filter(s => s); + const compactSchemas = schemas.filter(s => s); - if (schemasArr.length === 0) { + if (compactSchemas.length === 0) { return null; } else { - return mergeGraphQLSchemas(schemasArr); + return mergeTypeDefs(compactSchemas); } } diff --git a/packages/graphql-codegen-core/package.json b/packages/graphql-codegen-core/package.json index e331d9c5ae6..d124900572e 100644 --- a/packages/graphql-codegen-core/package.json +++ b/packages/graphql-codegen-core/package.json @@ -64,7 +64,7 @@ "change-case": "3.1.0", "common-tags": "1.8.0", "graphql-tag": "2.10.1", - "graphql-toolkit": "0.0.5", + "graphql-toolkit": "0.1.1", "graphql-tools": "4.0.4", "ts-log": "2.1.4", "winston": "3.2.1" diff --git a/yarn.lock b/yarn.lock index 1ae647724b9..f16225da87a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1684,6 +1684,14 @@ address@1.0.3, address@^1.0.1: resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" integrity sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg== +aggregate-error@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-2.0.0.tgz#65bd82beba40097eacb2f1077a5b55c593b18abc" + integrity sha512-xA1VQPApQdDehIIpS3gBFkMGDRb9pDYwZPVUOoX8A0lU3GB0mjiACqsa9ByBurU53erhjamf5I4VNRitCfXhjg== + dependencies: + clean-stack "^2.0.0" + indent-string "^3.0.0" + ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -2979,6 +2987,11 @@ clean-css@4.2.x: dependencies: source-map "~0.6.0" +clean-stack@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.0.0.tgz#301bfa9e8dd2d3d984c0e542f7aa67b996f63e0a" + integrity sha512-VEoL9Qh7I8s8iHnV53DaeWSt8NJ0g3khMfK6NiCPB7H657juhro+cSw2O88uo3bo0c0X5usamtXk0/Of0wXa5A== + cli-cursor@^2.0.0, cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -3978,12 +3991,7 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.1.0.tgz#a612626ce4803da410d77554bfd80361599c034d" - integrity sha512-/TnecbwXEdycfbsM2++O3eGiatEFHjjNciHEwJclM+T5Kd94qD1AP+2elP/Mq0L5b9VZJao5znR01Mz6eX8Seg== - -deepmerge@^3.0.0: +deepmerge@3.2.0, deepmerge@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e" integrity sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow== @@ -5711,17 +5719,6 @@ graphql-request@^1.5.0: dependencies: cross-fetch "2.2.2" -graphql-tag-pluck@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/graphql-tag-pluck/-/graphql-tag-pluck-0.5.0.tgz#81f5dee3a6ca829f205ab032336be7b107398b2e" - integrity sha512-SlsIpXKbrKIV2+QxYZ7bFPQ0DpIXFd0BEz3U+Krt8tuHYMFtElcctNDppW4EeQTrSX9H5zpStBZyfOYQjQOH1w== - dependencies: - "@babel/parser" "^7.2.0" - "@babel/traverse" "^7.1.6" - "@babel/types" "^7.2.0" - source-map-support "^0.5.9" - typescript "^3.2.2" - graphql-tag-pluck@0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/graphql-tag-pluck/-/graphql-tag-pluck-0.6.0.tgz#d03ab981cd8d31e564d37f8b9bac94a523dc29dd" @@ -5738,19 +5735,21 @@ graphql-tag@2.10.1: resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02" integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg== -graphql-toolkit@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/graphql-toolkit/-/graphql-toolkit-0.0.5.tgz#9e6ebe3d4b33fc329e5ee3b7775bfe7fba2f48a5" - integrity sha512-655RP1y8cn65mOa9EE/jnttczHE0lFXpOV1zYLTsE1A0b5j8RVuKWllSZBnnL2WHSAPPqLZ1oJEZV2uzSdV9VQ== +graphql-toolkit@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/graphql-toolkit/-/graphql-toolkit-0.1.1.tgz#b1d50afeb9f11ba90f93e896ca8f48308ca7b549" + integrity sha512-MLTqeYi0k1KVEeVEPMLBoeAYWWOUc8OCu3DmfzHMHtahz+RatV9zBlRA0vghWAjzJP7/zH4xM9bJldF5RaV7GQ== dependencies: - deepmerge "3.1.0" + aggregate-error "2.0.0" + deepmerge "3.2.0" glob "7.1.3" graphql-import "0.7.1" - graphql-tag-pluck "0.5.0" + 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" graphql-tools@4.0.4: