Unverified Commit f18ce55d authored by Pavel Mineev's avatar Pavel Mineev Committed by GitHub

(example/with-typescript-grapql): fix deps (#26010)

### 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)
parent 2477b137
schema: '**/*.graphqls' schema: '**/*.graphqls'
schemaEntrypoint: 'lib/type-defs.graphqls'
documents: '**/*.graphql' documents: '**/*.graphql'
plugins: plugins:
- typescript
- typescript-operations - typescript-operations
- typescript-react-apollo - typescript-react-apollo
cacheDir: __generated__ cacheDir: __generated__
...@@ -17,6 +17,12 @@ const News = () => { ...@@ -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. 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 your own
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
}, },
"devDependencies": { "devDependencies": {
"@graphql-codegen/cli": "^1.17.8", "@graphql-codegen/cli": "^1.17.8",
"@graphql-codegen/import-types-preset": "1.18.2",
"@graphql-codegen/plugin-helpers": "^1.17.8", "@graphql-codegen/plugin-helpers": "^1.17.8",
"@graphql-codegen/typescript": "^1.17.8", "@graphql-codegen/typescript": "^1.17.8",
"@graphql-codegen/typescript-operations": "^1.17.8", "@graphql-codegen/typescript-operations": "^1.17.8",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment