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
{{ message }}
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
This now works without an error. But the linter complains that Id looks ugly in the code, and I'm inclined to agree. But I don't know why I cannot just name it ID.
The text was updated successfully, but these errors were encountered:
I do not have a solution. But I believe to know why this is.
reverseGraphqlFieldName blindly converts the graphql name back to the Go field name by simply making the first letter upper case. The graphql tags override the standard forward conversion of Go field names to graphql names. reverseGraphqlFieldName completely ignores this. Thus graphql id becomes Go field name Id, which is why the Go field must be called Id, at which point you could drop the graphql tag again because it is no longer required.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When trying to enable pagination, I have to add a
Key
to my object. The struct looks like this (simplified for brevity):I get the error
Error building schema: field doesn't exist on struct
.Next I changed the
Key
registration toThis gives me the error:
Error building schema: bad method place on type schemabuilder.query: key field doesn't exist on object
So lastly I changed the name of the
ID
field:This now works without an error. But the linter complains that
Id
looks ugly in the code, and I'm inclined to agree. But I don't know why I cannot just name itID
.The text was updated successfully, but these errors were encountered: