graphql-go / graphql-go/graphql

Issue with embedded Struct response

Open
#170 23 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.1k
Forks
845
PR merge metrics
No merged PRs in 30d

Description

type Address struct {
City string `json:"city"`
State string `json:"state"`
}

type User struct {
Name string `json:"name"`
Email string `json:"email"`
Address
}

My resolver is returning User struct, And I am getting following response :
{
"name":"Jon",
"email":"jon@email.com",
"city":null,
"state":null
}

Address is common struct shared by many sql tables.
How can I fix city and state response?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.