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
Would it be possible to generate code using string as the underlying type of GQL ID? Currently it is generated as int, which is more cumbersome for my databases.
The text was updated successfully, but these errors were encountered:
Yes, as a matter of fact I was trying to do the opposite- use an int as the ID type in my own mapped type, but gqlgen fails with this error:
type mismatch on Org.id, expected string got int
But it looks like this is the correct behavior, according to the graphql docs:
ID: The ID scalar type represents a unique identifier, often used to refetch an object or as the key for a cache. The ID type is serialized in the same way as a String; however, defining it as an ID signifies that it is not intended to be human‐readable.
Would it be possible to generate code using
string
as the underlying type of GQL ID? Currently it is generated asint
, which is more cumbersome for my databases.The text was updated successfully, but these errors were encountered: