Closed sikanhe closed 3 years ago
I'm keeping an eye on this and will gladly provide more input if needed (me and @sikanhe spoke on Discord about this). 👀
I created some relay types for my project. It might be possible to make them more abstract to fit more use-cases as a lot of might be dependent on the underlying data layer.
See:
Module for encoding and decoding IDs: https://github.com/dungeon-revealer/dungeon-revealer/blob/master/server/graphql/modules/relay-spec/index.ts
Node Interface related types: https://github.com/dungeon-revealer/dungeon-revealer/blob/master/server/graphql/modules/relay-spec/graphql-page-info-type.ts
Query.node
field: https://github.com/dungeon-revealer/dungeon-revealer/blob/cc753f397fd7da66829bdc6d28c22e8eb54f1700/server/graphql/index.ts#L27-L51
I am also heavily using io-ts.
@n1ru4l will take a look !
Would love to have type safe relay helpers.
@n1ru4l It seems like you use relay in your project - any input on this?