Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
strapi/strapi#8374
getting error ` Error: Body must be a string. Received: undefined.` while generate, since this `graphql-codegen` update to new version 1.0 using graphql 15, but the old version in the readme using graphql 14, which cause this issue
  • Loading branch information
hiepxanh authored Oct 31, 2021
1 parent d987e11 commit a6f2c86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ A plugin for graphql-code-generator

Install graphql-code-generator and this plugin

npm i -D graphql-code-generator graphql-codegen-persisted-query-ids
npm i -D graphql @graphql-codegen/cli graphql-codegen-persisted-query-ids

## Usage

Create codegen.yml

```yaml
schema: http://app.test/graphql
documents: "./src/**/*.js"
schema: http://localhost:5000/graphql
documents: "./src/**/*.ts"
generates:
persisted-query-ids/client.json:
- graphql-codegen-persisted-query-ids:
Expand All @@ -30,7 +30,7 @@ generates:
Run the generator
mkdir persisted-query-ids
./node_modules/.bin/gql-gen --overwrite
npx graphql-codegen
This will generate two json files. The `server.json` is a query id mapping to
the actual queries which should be consumed by the server.
Expand Down

0 comments on commit a6f2c86

Please sign in to comment.