Skip to content

Commit

Permalink
use proper GraphQL doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JairusSW committed Nov 4, 2024
1 parent dedaa19 commit 5f97d33
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions runtime/graphql/schemagen/schemagen.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ func writeSchema(buf *bytes.Buffer, queryFields []*FieldDefinition, mutationFiel
for _, t := range inputTypeDefs {
buf.WriteByte('\n')
if t.Docs != nil {
for _, l := range strings.Split(t.Docs.Description, "\n") {
buf.WriteString("# " + l + "\n")
}
buf.WriteString("\"\"\"\n")
buf.WriteString(t.Docs.Description)
buf.WriteString("\"\"\"\n")
}
buf.WriteString("input ")
buf.WriteString(t.Name)
Expand Down Expand Up @@ -376,9 +376,9 @@ func writeSchema(buf *bytes.Buffer, queryFields []*FieldDefinition, mutationFiel
func writeField(buf *bytes.Buffer, field *FieldDefinition) {
buf.WriteString(" ")
if field.Docs != nil {
for _, l := range strings.Split(field.Docs.Description, "\n") {
buf.WriteString("# " + l + "\n")
}
buf.WriteString("\"\"\"\n")
buf.WriteString(field.Docs.Description)
buf.WriteString("\"\"\"\n")
buf.WriteString(" ")
}
buf.WriteString(field.Name)
Expand Down

0 comments on commit 5f97d33

Please sign in to comment.