Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/metadata/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func (t *TypeDefinition) WithId(id uint32) *TypeDefinition {

func (t *TypeDefinition) WithField(name string, typ string, docs ...*Docs) *TypeDefinition {
f := &Field{Name: name, Type: typ}
t.Fields = append(t.Fields, f)
if len(docs) > 0 && docs[0] != nil {
t.Docs = docs[0]
f.Docs = docs[0]
}
t.Fields = append(t.Fields, f)
return t
}

Expand Down
12 changes: 12 additions & 0 deletions runtime/graphql/schemagen/schemagen_as_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,15 @@ Each field corresponds to a specific part of the address.
The location field stores geospatial coordinates.
"""
input AddressInput {
"""
Street that the user lives on
"""
street: String!
city: String!
state: String!
"""
Country that the user is from
"""
country: String!
postalCode: String!
location: CoordinatesInput!
Expand Down Expand Up @@ -276,9 +282,15 @@ Each field corresponds to a specific part of the address.
The location field stores geospatial coordinates.
"""
type Address {
"""
Street that the user lives on
"""
street: String!
city: String!
state: String!
"""
Country that the user is from
"""
country: String!
postalCode: String!
location: Coordinates!
Expand Down
12 changes: 12 additions & 0 deletions runtime/graphql/schemagen/schemagen_go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,15 @@ Each field corresponds to a specific part of the address.
The location field stores geospatial coordinates.
"""
input AddressInput {
"""
Street that the user lives on
"""
street: String!
city: String!
state: String!
"""
Country that the user is from
"""
country: String!
postalCode: String!
location: CoordinatesInput!
Expand Down Expand Up @@ -310,9 +316,15 @@ Each field corresponds to a specific part of the address.
The location field stores geospatial coordinates.
"""
type Address {
"""
Street that the user lives on
"""
street: String!
city: String!
state: String!
"""
Country that the user is from
"""
country: String!
postalCode: String!
location: Coordinates!
Expand Down
Loading