Skip to content

Commit 5adf7d7

Browse files
committed
Update Blog “how-we-implemented-type-safe-graphql-with-hasura-and-the-graphql-codegen-cli-tool/index”
1 parent d410603 commit 5adf7d7

File tree

7 files changed

+4
-5
lines changed

7 files changed

+4
-5
lines changed

content/blog/how-we-implemented-type-safe-graphql-with-hasura-and-the-graphql-codegen-cli-tool/index.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Enter [graphql-codegen](https://the-guild.dev/graphql/codegen) - a CLI tool that
1212

1313
## Installation
1414

15-
Note: _the following steps assume you have a working TypeScript app that is connected to an established Hasura GraphQL API with at least one GraphQL query/mutation/subscription_
15+
Note: *the following steps assume you have a working TypeScript app that is connected to an established Hasura GraphQL API with at least one GraphQL query/mutation/subscription*
1616

1717
First, you'll need to install the tool and a few dependencies. Run the following:
1818

@@ -73,13 +73,12 @@ const config: IGraphQLConfig = {
7373
};
7474

7575
export default config;
76-
7776
```
7877

7978
A few notes about the above config:
8079

81-
- We are using Vite as our build tool. We import several environment variables via Vite's `loadEnv`. The `schema` config will be the same for you - just pop in your Hasura GraphQL API URL and admin secret and you should be set
82-
- Plugins allows for tons of custom configuration. We've chosen several customization that work well for us, but you might choose something differe. Also, make note of the `typescript-generic-sdk` plugin - we'll talk more about that later
80+
* We are using Vite as our build tool. We import several environment variables via Vite's `loadEnv`. The `schema` config will be the same for you - just pop in your Hasura GraphQL API URL and admin secret and you should be set
81+
* Plugins allows for tons of custom configuration. We've chosen several customization that work well for us, but you might choose something differe. Also, make note of the `typescript-generic-sdk` plugin - we'll talk more about that later
8382

8483
## An Example Mutation
8584

@@ -159,4 +158,4 @@ and we see the typed response:
159158

160159
and if we keep going, we also see the `id` mentioned earlier would be available to us
161160

162-
![The typed payload from our GraphQL mutation](requester_typed_response_data.png)
161+
![The typed payload from our GraphQL mutation](requester_typed_response_data.png)

0 commit comments

Comments
 (0)