Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

[RFC] Add graphql type helpers #6

Open
mitchelvanbever opened this issue Jan 13, 2021 · 0 comments
Open

[RFC] Add graphql type helpers #6

mitchelvanbever opened this issue Jan 13, 2021 · 0 comments
Labels
Type: Feature New Feature

Comments

@mitchelvanbever
Copy link
Member

mitchelvanbever commented Jan 13, 2021

Add a type utility to the helpers folder specifically with generics for typescript.

example of useful helper for graphql

export type getNode<Input extends { edges: any }> = NonNullable<
  NonNullable<Input['edges'][number]>['node']
>;

But also creating an [{label: 'label', value: Enum.value}] from an Enum would be very nice

@mitchelvanbever mitchelvanbever added the Type: Feature New Feature label Jan 13, 2021
@mitchelvanbever mitchelvanbever changed the title [request] Add graphql type helpers [RFC] Add graphql type helpers Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New Feature
Projects
None yet
Development

No branches or pull requests

1 participant