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
This package exports a `Client` for interacting with the `feeds-manager` service of core. The implementation is based on code generated via `[genqlient](https://github.com/Khan/genqlient)`.
3
+
This package exports a `Client` for interacting with the `feeds-manager` service of core. The implementation is based on code generated via [genqlient](https://github.com/Khan/genqlient).
4
+
5
+
### Structure
6
+
7
+
```
8
+
client/ # Client interface, implementation, and types
9
+
internal/ # GraphQL queries/mutations and generated code
10
+
genqlient.graphql
11
+
generated/
12
+
```
13
+
14
+
### Prerequisites
15
+
16
+
-[go-task](https://taskfile.dev/) (`task` CLI)
17
+
- Go 1.21+
4
18
5
19
### Extending the Client
6
20
7
-
Add additional queries or mutations to `genqlient.graphql` and then regenerate the implementation via the Taskfile:
21
+
If your feature requires **new GraphQL operations**, add queries or mutations to `genqlient.graphql` and then regenerate the implementation via the Taskfile:
8
22
9
23
```bash
10
24
$ task generate
11
25
```
12
26
13
27
Next, extend the `Client` interface and the `client` implementation.
28
+
29
+
If your feature **composes existing operations** (e.g. filtering or combining results from already-generated queries), you can extend the `Client` interface and implementation directly without modifying `genqlient.graphql` or regenerating.
30
+
31
+
### Usage
32
+
33
+
See `devenv/don.go` and `keystone/scripts/main.go` for real-world usage examples.
0 commit comments