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
As discussed in #37, the Graphql spec is actively working on a proposal to have a "serializes as" field for scalars in the introspection schema. This would allow this library's generated code to know whether to expect the scalar response to be sending back a Float or Int, etc., and would allow it to send that type when arguments of a given scalar type are passed to the server.
Currently there's nothing to be done on the Elm side because no servers implement this. But I'd like to add this functionality as soon as an implementation is available, and I'd like to track the progress of server implementations here. @xtian is considering contributing to or requesting an Elixir implementation.
The text was updated successfully, but these errors were encountered:
It looks like, despite many users requesting they consider otherwise, ofType must be either one of the built in scalars or null:
Serialize as type
A custom scalar may provide a built-in scalar type which describes how the
custom scalar is serialized. This provides more information for how execution
responses are query variable inputs are coerced. If provided, this built-in
scalar can be used both for improved validation results and stricter guarantees
during execution.
While a custom scalar type is not required to provide a serialize as type, if
one is provided it must be one of the built-in scalar types (Int, Float, String, Boolean, ID).
That means that it cannot be serialized as a "compound" type like a list or an object.
As discussed in #37, the Graphql spec is actively working on a proposal to have a "serializes as" field for scalars in the introspection schema. This would allow this library's generated code to know whether to expect the scalar response to be sending back a Float or Int, etc., and would allow it to send that type when arguments of a given scalar type are passed to the server.
Currently there's nothing to be done on the Elm side because no servers implement this. But I'd like to add this functionality as soon as an implementation is available, and I'd like to track the progress of server implementations here. @xtian is considering contributing to or requesting an Elixir implementation.
The text was updated successfully, but these errors were encountered: