Skip to content

Add support for descriptions for Ash.Type.Enum and Ash.Type.NewType types #292

Open
@sevenseacat

Description

@sevenseacat

Is your feature request related to a problem? Please describe.

It's possible to add a description when defining an Ash.Type.Enum, eg.

defmodule AshGraphql.Test.StatusEnum do
  use Ash.Type.Enum, values: [:open, :closed], description: "A status field"

(I don't see this in the docs anywhere for Ash.Type.Enum, but it doesn't raise an error...)

This description should flow through to any generated GraphQL schema documentation.

I know we use Absinthe under the hood, and Absinthe supports @desc for enums so we might be missing a step when converting Ash types to Absinthe types?

It's not currently possible to add a description to types defined with Ash.Type.NewType, but there should be a PR open for that soon. When that is added, those descriptions should flow through too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Soon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions