You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So you are returning a value, but it looks like an array to Lacinia, but you have a scalar for the value type such that it can be serialized into the response as is. Right?
This is, to me, an odd edge case.
Could you wrap your JSON value in a wrapper that isn't a sequential, and have your :serializer extract the nested value?
That is correct, I had a scalar JSON type that I was using which was sometimes an array. I wound up wrapping it like you suggested as a work-around. I was just surprised by the error.
It might help to have an example of this in the documentation to clarify when the :serializer functions are run.
I added a custom JSON scalar type to my schema and I cannot return a JSON array because of the check for sequential values here:
lacinia/src/com/walmartlabs/lacinia/schema.clj
Line 414 in d8cb65d
While this is useful for debugging, it shouldn't be applied to custom scalar types.
The text was updated successfully, but these errors were encountered: