gqlgen-tutorials
gqlgen-tutorials copied to clipboard
Type on UserId
I believe that the UserId has a typo and should be UserID. Still get this error when I change it though.
cannot use input.UserID (variable of type string) as int value in struct literal
Just had to change to type string in the todo. But you may want to update the tutorial for Todo schema to:
package model
type Todo struct {
ID string json:"id"
Text string json:"text"
Done bool json:"done"
UserID string json:"user"
}