From 4a533748f32cf9788932b5aaa72b65ba3ac37830 Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sat, 1 May 2021 17:45:31 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E5=A4=8D=E5=8E=9F=20graphql=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BC=80=E5=8F=91?= =?UTF-8?q?=20port.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- graphql.schema.json | 26 +++++++++++++------------- package.json | 3 ++- src/generated/graphql.tsx | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/graphql.schema.json b/graphql.schema.json index f627d1b..10022ec 100644 --- a/graphql.schema.json +++ b/graphql.schema.json @@ -335,8 +335,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Article", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -349,6 +349,16 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "SCALAR", + "name": "Int", + "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "Query", @@ -503,7 +513,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -516,16 +526,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, { "kind": "SCALAR", "name": "Boolean", diff --git a/package.json b/package.json index 27c5346..93fe02d 100644 --- a/package.json +++ b/package.json @@ -35,10 +35,11 @@ "yup": "^0.32.9" }, "scripts": { - "start": "PORT=7133 BROWSER=none react-scripts start", + "start": "PORT=7135 BROWSER=none react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", + "prestart": "npm run graphql", "graphql": "graphql-codegen --config codegen.yml" }, "eslintConfig": { diff --git a/src/generated/graphql.tsx b/src/generated/graphql.tsx index 1323137..06624ca 100644 --- a/src/generated/graphql.tsx +++ b/src/generated/graphql.tsx @@ -40,7 +40,7 @@ export type Mutation = { __typename?: 'Mutation'; createArticle: Article; updateArticle: Article; - removeArticle: Article; + removeArticle: Scalars['Int']; }; @@ -75,5 +75,5 @@ export type UpdateArticleInput = { content?: Maybe; publishedAt?: Maybe; tags?: Maybe>; - id: Scalars['Int']; + id: Scalars['String']; };