Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@desc does not work for field arguments #650

Closed
binarylogic opened this issue Dec 13, 2018 · 1 comment · Fixed by #738
Closed

@desc does not work for field arguments #650

binarylogic opened this issue Dec 13, 2018 · 1 comment · Fixed by #738

Comments

@binarylogic
Copy link

Environment

  • Elixir version (elixir -v): 1.7.3
  • Absinthe version (mix deps | grep absinthe): 1.5.0-alpha.1

Expected behavior

query do
  field :my_operation do
    @desc "My argument description"
    arg :my_arg, :integer
  end
end

I expect the @desc call to add a :description to the argument.

Actual behavior

The @desc above an argument does not work, it appears to be completely ignored.

@FloatingFront
Copy link

Same issue is popping up here:

Environment

  • Elixir version (elixir -v):
    Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
    Elixir 1.8.1 (compiled with Erlang/OTP 21)

  • Absinthe version (mix deps | grep absinthe):
    absinthe 1.4.16 (Hex package) (mix)
    locked at 1.4.16 (absinthe) 0933e4d9
    absinthe_plug 1.4.2 (Hex package) (mix)
    locked at 1.4.2 (absinthe_plug) 01bf16f0
    absinthe_phoenix 1.4.2 (Hex package) (mix)
    locked at 1.4.2 (absinthe_phoenix) cb84c81b
    absinthe_relay 1.4.0 (Hex package) (mix)
    locked at 1.4.0 (absinthe_relay) 0c65cb40

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.

Actual behavior

No field description is generated in the response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants