Skip to content

🐞 elixir: a function that return scalar type return incorrect result #8173

@wingyplus

Description

@wingyplus

What is the issue?

Let's see the TypeDef.kind function:

@spec kind(t()) :: Dagger.TypeDefKind.t()
def kind(%__MODULE__{} = type_def) do
query_builder =
type_def.query_builder |> QB.select("kind")
Client.execute(type_def.client, query_builder)
end

It have 2 issues:

  1. The Typespec returns incorrect result, it should be {:ok, Dagger.TypeDefKind.t()} instead of Dagger.TypeDefKind.t().
  2. The result return {:ok, scalar_value}, the scalar_value is string not an atom defined in Dagger.TypeDefKind.t().

Dagger version

0.12.5

Steps to reproduce

Log output

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions