dotansimha / dotansimha/graphql-code-generator-community

[typescript-react-query] add ability to customize react-query key with a directive

Open
#209 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

**Is your feature request related to a problem? Please describe.**

The react-query key is automatically generated from the query name, but there are situations where you might want to change the query key (e.g. for easier invalidation).

**Describe the solution you'd like**

Add a `@reactQueryKey` directive on `QUERY` to allow customizing the generated key.

**Describe alternatives you've considered**

Add an argument to the generated hook that allows specifying the key. This might be useful but also feels like it could be overkill.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.