Although not strictly to spec, some upstream graphql implementations such as the start.gg
API encode their ID types as integers rather than strings. Prior to this commit,
deserialization would fail in such cases, since graphql_client simply type aliases the ID
type to a String. This commit introduces a simple deserialization helper that enables us
to handle both integers and strings while maintaining backward compatbility for downstream
users.
Although not strictly to spec, some upstream graphql implementations such as the start.gg API encode their ID types as integers rather than strings. Prior to this commit, deserialization would fail in such cases, since graphql_client simply type aliases the ID type to a String. This commit introduces a simple deserialization helper that enables us to handle both integers and strings while maintaining backward compatbility for downstream users.
Fixes: https://github.com/graphql-rust/graphql-client/issues/455