absinthe-graphql / absinthe

The GraphQL toolkit for Elixir
http://absinthe-graphql.org
Other
4.29k stars 526 forks source link

Duplicate of "@desc does not work for field arguments #650" #695

Closed FloatingFront closed 5 years ago

FloatingFront commented 5 years ago

Environment

Expected behavior

Adding description to fields should be reflected in the response.

Neither this:

 query do
    field :menu_items, list_of(:menu_item),
          description: "The list of available items on the menu" do
      resolve fn _, _, _ ->
        {:ok, Repo.all(Menu.Item)}
      end
    end
end

Nor this:

query do
    @desc "The list of available items on the menu"
    field :menu_items, list_of(:menu_item) do
      resolve fn _, _, _ ->
        {:ok, Repo.all(Menu.Item)}
      end
    end
end

does provide description in the response.

Issue 650 does mention this, but it puts @desc inline with the field, instead at the top,

Actual behavior

No description is generated in the response

FloatingFront commented 5 years ago

I am closing this issue, as it is a duplicate of issue #650 "@desc does not work for field arguments" - sorry for the inconvenience, did not mean to create unnecessary duplicate issue entry.