From 4e5bde8ee38ff37f460a14cf276e1bb3666738e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Sat, 4 Apr 2020 11:14:17 +0200 Subject: [PATCH] feat(): update to graphql v15 --- package-lock.json | 18 +++++- package.json | 2 +- tests/utils/printed-schema.snapshot.ts | 90 +++++++++++++------------- 3 files changed, 62 insertions(+), 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index fb217018c..4fa1ad749 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2083,7 +2083,19 @@ "requires": { "@types/express": "*", "@types/fs-capacitor": "*", - "@types/koa": "*" + "@types/koa": "*", + "graphql": "^14.5.3" + }, + "dependencies": { + "graphql": { + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.6.0.tgz", + "integrity": "sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg==", + "dev": true, + "requires": { + "iterall": "^1.2.2" + } + } } }, "@types/http-assert": { @@ -6925,6 +6937,7 @@ "version": "4.0.7", "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.7.tgz", "integrity": "sha512-rApl8sT8t/W1uQRcwzxMYyUBiCl/XicluApiDkNze5TX/GR0BSTQMjM2UcRGdTmkbsb1Eqq6afkyyeG/zMxZYQ==", + "dev": true, "requires": { "apollo-link": "^1.2.3", "apollo-utilities": "^1.0.1", @@ -6936,7 +6949,8 @@ "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true } } }, diff --git a/package.json b/package.json index 5d8a2c892..62c38e58a 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "eslint-config-prettier": "6.10.1", "eslint-plugin-import": "2.20.2", "graphql": "15.0.0", + "graphql-tools": "4.0.7", "husky": "4.2.3", "jest": "25.2.7", "lint-staged": "10.1.1", @@ -59,7 +60,6 @@ "dependencies": { "chokidar": "3.3.1", "fast-glob": "3.2.2", - "graphql-tools": "4.0.7", "iterall": "1.2.2", "lodash": "4.17.15", "merge-graphql-schemas": "1.7.7", diff --git a/tests/utils/printed-schema.snapshot.ts b/tests/utils/printed-schema.snapshot.ts index 1070655ef..f851de4af 100644 --- a/tests/utils/printed-schema.snapshot.ts +++ b/tests/utils/printed-schema.snapshot.ts @@ -2,17 +2,38 @@ export const printedSchemaSnapshot = `# ---------------------------------------- # THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY) # ------------------------------------------------------ +"""example interface""" +interface IRecipe { + id: ID! + title: String! +} + +"""recipe object type""" +type Recipe implements IRecipe { + id: ID! + title: String! + description: String + creationDate: DateTime! + averageRating: Float! + lastRate: Float + tags: [String!]! + ingredients: [Ingredient!]! + count(type: String, status: String): Float! + rating: Float! +} + """ A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. """ scalar DateTime -"""The basic directions""" -enum Direction { - Up - Down - Left - Right +"""orphaned type""" +type SampleOrphanedType { + id: ID! + title: String! + description: String + creationDate: DateTime! + averageRating: Float! } type Ingredient { @@ -22,25 +43,6 @@ type Ingredient { name: String @deprecated(reason: "is deprecated") } -"""example interface""" -interface IRecipe { - id: ID! - title: String! -} - -type Mutation { - addRecipe(newRecipeData: NewRecipeInput!): Recipe! - removeRecipe(id: String!): Boolean! -} - -"""new recipe input""" -input NewRecipeInput { - """recipe title""" - title: String! - description: String - ingredients: [String!]! -} - type Query { move(direction: Direction!): Direction! @@ -57,32 +59,30 @@ type Query { ): [Recipe!]! } -"""recipe object type""" -type Recipe implements IRecipe { - id: ID! - title: String! - description: String - creationDate: DateTime! - averageRating: Float! - lastRate: Float - tags: [String!]! - ingredients: [Ingredient!]! - count(type: String, status: String): Float! - rating: Float! +"""The basic directions""" +enum Direction { + Up + Down + Left + Right } -"""orphaned type""" -type SampleOrphanedType { - id: ID! +"""Search result description""" +union SearchResultUnion = Ingredient | Recipe + +type Mutation { + addRecipe(newRecipeData: NewRecipeInput!): Recipe! + removeRecipe(id: String!): Boolean! +} + +"""new recipe input""" +input NewRecipeInput { + """recipe title""" title: String! description: String - creationDate: DateTime! - averageRating: Float! + ingredients: [String!]! } -"""Search result description""" -union SearchResultUnion = Ingredient | Recipe - type Subscription { """subscription description""" recipeAdded: Recipe!