Skip to content

Commit

Permalink
(example/with-typescript-grapql): fix deps (#26010)
Browse files Browse the repository at this point in the history
### Documentation / Examples

Fixed one of the items from #25854

- [x] add `@graphql-codegen/import-types-preset`
- [x] remove depriceated field `schemaEntrypoint`
- [x] add the StackBlitz button
- [x] Make sure the linting passes

[Live demo on StackBlitz](https://stackblitz.com/github/akellbl4/next.js/tree/example/with-typescript-graphql/fix-deps/examples/with-typescript-graphql)
  • Loading branch information
Pavel Mineev committed Jun 13, 2021
1 parent 2477b13 commit f18ce55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions examples/with-typescript-graphql/.graphql-let.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
schema: '**/*.graphqls'
schemaEntrypoint: 'lib/type-defs.graphqls'
documents: '**/*.graphql'
plugins:
- typescript
- typescript-operations
- typescript-react-apollo
cacheDir: __generated__
6 changes: 6 additions & 0 deletions examples/with-typescript-graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ const News = () => {

By default `**/*.graphqls` is recognized as GraphQL schema and `**/*.graphql` as GraphQL documents. If you prefer the other extensions, make sure the settings of the webpack loader in `next.config.js` and `.graphql-let.yml` are consistent.

## Preview

Preview the example live on [StackBlitz](http://stackblitz.com/):

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-typescript-graphql)

## Deploy your own

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
Expand Down
1 change: 1 addition & 0 deletions examples/with-typescript-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^1.17.8",
"@graphql-codegen/import-types-preset": "1.18.2",
"@graphql-codegen/plugin-helpers": "^1.17.8",
"@graphql-codegen/typescript": "^1.17.8",
"@graphql-codegen/typescript-operations": "^1.17.8",
Expand Down

0 comments on commit f18ce55

Please sign in to comment.