So I have to change the structs I made in Go and put their GraphQL types like this:
(prepending the “User.” in each json tag field)
// User model
type User struct {
Generic
ID string `json:"uid,omitempty"`
FirstName string `json:"User.firstName,omitempty"`
LastName string `json:"User.lastName,omitempty"`
Email string `json:"User.email,omitempty"`
Username string `json:"User.username,omitempty"`
Followers []User `json:"User.followers,omitempty"`
Posts []Post `json:"User.posts,omitempty"`
}
Isn’t it?