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']; };