graph-tooling icon indicating copy to clipboard operation
graph-tooling copied to clipboard

refactor type conversions

Open saihaj opened this issue 2 years ago • 3 comments

Today we have a map that we maintain to convert between ABI, Assembly Script and that is what is what we simply use to map to GraphQL Types. This approach is liming because then we need to do hacks like this to fix issues with code-generation

saihaj avatar Mar 20 '23 18:03 saihaj

#1025 will also help cause immutable makes it harder to deal with TS when writing and makes it harder to follow code.

saihaj avatar Mar 20 '23 18:03 saihaj

@saihaj what do you recommend instead of the current approach?

azf20 avatar Mar 22 '23 22:03 azf20

@saihaj what do you recommend instead of the current approach?

I think first step is moving away from the immutable and then I think we should create another MAP that maps a Value -> GraphQL type so there is a clear distinction on what a value will be converted to since today it is implicit inference that AssemblyScript -> Value == GraphQL Type

saihaj avatar Mar 23 '23 15:03 saihaj