We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This may be a result of #3.
Our case is like the following.
scalar Interval type ThingWithInterval { interval: Interval }
Interval is mapped to a corresponding type, like so:
Interval
type Interval { start: number; end: number; }
From server to client (using Apollo), we serialize the Interval like so:
serialize(value: Interval) { return [value.start, value.end]; },
Then we deserialize the serialized-Interval using this custom scalars exchange like so:
Interval(v) { console.log("Interval input: ", v); return new Interval(v[0], v[1]); }
The code runs the deserializer twice: once for each number in the serialized array-version of Interval.
number
For example, let us say the serialized Interval the client got was [100, 200]. Then the output from the console.log in the deserializer would be:
[100, 200]
console.log
Interval input: 100 Interval input: 200
Instead, we would expect the deserializer should run on the entire array. Then, the output from the console.log would be:
Interval input: [100,200]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This may be a result of #3.
Our case is like the following.
Interval
is mapped to a corresponding type, like so:From server to client (using Apollo), we serialize the
Interval
like so:Then we deserialize the serialized-Interval using this custom scalars exchange like so:
The code runs the deserializer twice: once for each
number
in the serialized array-version ofInterval
.For example, let us say the serialized
Interval
the client got was[100, 200]
. Then the output from theconsole.log
in the deserializer would be:Instead, we would expect the deserializer should run on the entire array. Then, the output from the
console.log
would be:The text was updated successfully, but these errors were encountered: