Skip to content

Interface in result type #3497

Closed Answered by mafalt
mafalt asked this question in Q&A
Discussion options

You must be logged in to vote

Finally I've found solution. The point is that I forgot to specify JSON field name for UpdateUser struct. With this everything' working:

var resp struct {
	UpdateUser struct {
		User *struct {
			ID                     string `json:"id"`
			LoginName              string `json:"loginName"`
			PasswordChangeRequired bool   `json:"passwordChangeRequired"`
			IsLocked               bool   `json:"isLocked"`
		}
		Errors []model.Error `json:"errors"`
	} `json:"updateUser"`
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mafalt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant