Replies: 1 comment
-
This discussion from apollo-client goes in detail into why this is difficult: apollographql/apollo-client#585 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Background
I've created a graph that declares custom scalars to represent vectors, matrices and quaternions.
schema.txt
My client implementations looks something like this:
I'm using a number array to pack the serialized values for each scalar. For example
The typescript definition for my matrix includes an
elements
array that is populated by a CustomScalar handler. The client however, only sees the raw number array for the field and does not know how to automatically parse it into aMatrix4
object. I need to hook in a custom scalar handler to do the mapping automatically when deserializing and serializing.Beta Was this translation helpful? Give feedback.
All reactions