graphql-code-generator-community icon indicating copy to clipboard operation
graphql-code-generator-community copied to clipboard

typescript-react-query getKey should add as const

Open iscekic opened this issue 1 year ago • 0 comments

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

I am using keys programmatically, and the type they resolve to isn't ergonomic. Eg.

(string | Exact<{
    ulid: string;
}>)[]

Describe the solution you'd like

It would be much nicer for this type to resolve to

[string, Exact<{ ulid: string; }>]

Which is achievable if as const is added to the resulting array.

Describe alternatives you've considered

N/A

Additional context

N/A

iscekic avatar Nov 14 '23 11:11 iscekic