Skip to content

Commit b834200

Browse files
committed
Readme Updates
1 parent 8c3cdbf commit b834200

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ graphql-codegen-hasura is a collection of code generator plugins for [graphql-co
44

55
These plugins require and augment the existing fantastic GraphQL code generator plugins available from [graphql-code-generator](https://graphql-code-generator.com/)
66

7-
- The **graphql-codegen-hasura-gql** plugin generates gql fragments, mutations and queries for every _Table_ defined in the Hasura database
7+
- The **graphql-codegen-hasura-gql** plugin generates [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) gql fragments, mutations and queries for every _Table_ defined in the Hasura database
88
- The **graphql-codegen-hasura-typescript** plugin generates [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) TypeScript helper methods for every _Table_ defined in the Hasura database.
99

1010
## Structure
@@ -17,7 +17,7 @@ The easiest way to quickly get going is to view the following files in the demo
1717

1818
- **Gql Generation Config**: `demo/graphql-codegen-gql.yaml`
1919
- **TypesScript Generation Config**: `demo/graphql-codegen-typescript.yaml`
20-
- **Output**: [See plugin details section below](#plugin-details)
20+
- **Output**: See [generated code in demo](https://github.com/ahrnee/graphql-codegen-hasura/tree/master/demo/src/autogen/hasura) and [See plugin details section below](#plugin-details).
2121

2222
It is **important to note**: The TypeScript Generation leverages the files created in the GQL generation step. As such, **it is important to run the GQL generation step prior to the TypeScript generation step**.
2323

@@ -151,7 +151,7 @@ const REMOVE_USERS_MODEL = gql`
151151

152152
Generates [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) TypeScript helper methods for every _Table_ defined in the Hasura database
153153

154-
The existing [@graphql-codegen/typescript-react-apollo](https://graphql-code-generator.com/docs/plugins/typescript-react-apollo) plugin already provides this capability for hooks. This plugin extends that to direct client.query & client.mutate calls, in addition to adding some convenience features. See [generated code in demo](https://github.com/ahrnee/graphql-codegen-hasura/tree/master/demo/src/autogen/hasura) for specifics
154+
The existing [@graphql-codegen/typescript-react-apollo](https://graphql-code-generator.com/docs/plugins/typescript-react-apollo) plugin already provides this capability for hooks. This plugin extends that to direct client.query & client.mutate calls, in addition to adding some convenience features.
155155

156156
See [demo/src/autogen/hasura/typescript.ts](https://github.com/ahrnee/graphql-codegen-hasura/tree/master/demo/src/autogen/hasura) for generated output files.
157157

@@ -210,7 +210,7 @@ export async function removeusersModel(
210210
A basic naming convention being followed:
211211

212212
- `*Model` is used for any entity or fieldset that contains only scalars, and not child entities are referenced or included
213-
- `*Graph` is used fro any entity or fieldset that contains or references child entities
213+
- `*Graph` is used for any entity or fieldset that contains or references child entities
214214

215215
## Demo
216216

@@ -223,9 +223,9 @@ The demo project is simply:
223223

224224
## Motivation
225225

226-
[Hasura](https://hasura.io/) is a fantastic tool for the rapid development of a GraphQL backend. [Apollo GraphQL](https://www.apollographql.com/) is a suite of GraphQL tooling, including a great Client. [graphql-code-generator](https://graphql-code-generator.com/) is a fantastic code generation tool and library, to automate the generation of much of the boilerplate code required to use GraphQL. However, there still remained quite a bit of boiler plate code to be written.
226+
[Hasura](https://hasura.io/) is a fantastic tool for the rapid development of a GraphQL backend. [Apollo GraphQL](https://www.apollographql.com/) is a suite of GraphQL tooling, including a great Client. [graphql-code-generator](https://graphql-code-generator.com/) is a very helpful code generation tool and library, to automate the generation of much of the boilerplate code required to use GraphQL. However, there still remained quite a bit of boiler plate code to be written.
227227

228-
The consistency and predictability of the Hasura](https://hasura.io/) GQL backend implementation, provided an opportunity to automate much of the remaining code for standard single-table mutations and queries, and multi-table helper code. This plugin is an attempt to do some of that.
228+
The consistency and predictability of the [Hasura](https://hasura.io/) GQL backend implementation, provided an opportunity to automate much of the remaining code for standard single-table mutations and queries, and multi-table helper code. This plugin is an attempt to help do this.
229229

230230
## Disclaimers & Known Issues
231231

@@ -241,6 +241,7 @@ There are many refinements and enhancements that would be beneficial, and contri
241241

242242
- Fix known issues
243243
- Add validation (especially for checking for package prerequisites). See [these docs](https://graphql-code-generator.com/docs/custom-codegen/validate-configuration)
244+
- Extend capabilities to facilitate codegen for multi-table queries and mutations. One implementation strategy is to perhaps generate gql and helper code from user-defined gql fragments. Will require some design work.
244245
- Rewrite the plugins to use the graphql-code-generator [recommended Visitor pattern](https://graphql-code-generator.com/docs/custom-codegen/using-visitor)
245246

246247
## Notes

0 commit comments

Comments
 (0)