Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

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

Fixed one of the items from vercel#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 authored Jun 13, 2021
1 parent 00ad0e2 commit ef59147
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 ef59147

Please sign in to comment.