You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+6
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
| apollo:download| npx apollo service:download --endpoint=http://localhost:3000/api/graphql graphql-schema.json | download a graphql schema from an endpoint |
52
+
| apollo:generate| npx apollo codegen:generate types --localSchemaFile=graphql-schema.json --target=typescript --tagName=gql --outputFlat --tsFileExtension=d.ts | use for generating typing files from a graphql schema |
| prepare | husky install | This is needed from husky to set up the project |
53
55
54
56
## Acknowledgement
55
57
56
58
This project is build with :
57
59
58
60
-[NextJs](https://nextjs.org/)
61
+
-[Apollo](https://www.apollographql.com/)
59
62
-[Tailwindcss](https://tailwindcss.com/)
60
63
-[Typescript](https://www.typescriptlang.org/)
61
64
-[react-intl](https://formatjs.io/)
@@ -105,6 +108,12 @@ Given the [conventionalcommits](https://www.conventionalcommits.org/en/v1.0.0/):
105
108
[optional footer(s)]
106
109
```
107
110
111
+
## Generate typing from graphql schema
112
+
113
+
You may need to look at [apollo-tooling](https://github.com/apollographql/apollo-tooling)
114
+
115
+
With the graphql endpoint running launch `yarn apollo:download` follow by `yarn apollo:generate`, this will create under `types` a typing file for each query under `apollo/operations`.
116
+
108
117
## Contributing
109
118
110
119
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
0 commit comments