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
For a query or mutation, we must use a wrapper struct as the response struct.
This is very counterintuitive and should be pointed out in the example.
For example, for the following query,
type Query {
lesson(id: ID!): Lesson!
}
We need the following wrapper struct as the response,
type RespData {
Lesson: Lesson json: "lesson"
}
Or we can do as following:
var respData map[string]interface{}
convertMapDataToLesson(respData)
The text was updated successfully, but these errors were encountered:
For a query or mutation, we must use a wrapper struct as the response struct.
This is very counterintuitive and should be pointed out in the example.
For example, for the following query,
type Query {
lesson(id: ID!): Lesson!
}
We need the following wrapper struct as the response,
type RespData {
Lesson: Lesson
json: "lesson"
}
Or we can do as following:
var respData map[string]interface{}
convertMapDataToLesson(respData)
The text was updated successfully, but these errors were encountered: