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
#711 highlighted that some GraphQL servers don't stick precisely to the spec, particularly around integers.
It's currently possible to work around this with newtypes, but I would like users to be able to just declare that i64 is acceptable in Int position. Similarly, if someone wants to use an alternative type in place of String (SmolStr for example) that should be possible.
The main obstacle to this is that we use built in types as type markers for these, so the orphan rule prevents you from doing impl IsScalar<i32> for any types that you don't own. If we updated the schema to output dedicated type markers for all the built in scalars that should make this possible.
Technically a breaking change, but probably not one that would affect most users.
Also want to make sure to document this when I get to it.
The text was updated successfully, but these errors were encountered:
#711 highlighted that some GraphQL servers don't stick precisely to the spec, particularly around integers.
It's currently possible to work around this with newtypes, but I would like users to be able to just declare that
i64
is acceptable inInt
position. Similarly, if someone wants to use an alternative type in place ofString
(SmolStr
for example) that should be possible.The main obstacle to this is that we use built in types as type markers for these, so the orphan rule prevents you from doing
impl IsScalar<i32>
for any types that you don't own. If we updated the schema to output dedicated type markers for all the built in scalars that should make this possible.Technically a breaking change, but probably not one that would affect most users.
Also want to make sure to document this when I get to it.
The text was updated successfully, but these errors were encountered: