Skip to content

Use godoc for descriptions #2

@shreyas44

Description

@shreyas44

Currently, to provide descriptions for fields we need to use the description struct tag. While this is fine, the lines would be really long for long descriptions, and it might be easier to use regular docstrings for descriptions.

Instead of

type User struct {
  ID string `description:"user id"`
}

We do

type User struct {
  // user id
  ID string
}

Using docstrings would also allow us to support descriptions for enums and type definitions. We should continue to support the description struct tag as an override in case the user wants to use different descriptions on the GraphQL and Go sides.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions