gqlgen-tutorials icon indicating copy to clipboard operation
gqlgen-tutorials copied to clipboard

Type on UserId

Open adventurini opened this issue 5 years ago • 1 comments

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

adventurini avatar Mar 03 '20 19:03 adventurini

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" }

adventurini avatar Mar 03 '20 19:03 adventurini