fix: use module name specific to the api

fix: support booleans
This commit is contained in:
Zach Daniel 2020-09-02 00:52:51 -04:00
parent 24e5bc7132
commit c74f76f8a0
No known key found for this signature in database
GPG key ID: C377365383138D4B
2 changed files with 3 additions and 2 deletions

View file

@ -8,7 +8,7 @@ defmodule AshGraphql do
defmacro __using__(opts) do
quote bind_quoted: [api: opts[:api]] do
defmodule AshTypes do
defmodule Module.concat(api, AshTypes) do
@moduledoc false
alias Absinthe.{Blueprint, Phase, Pipeline}
@ -58,7 +58,7 @@ defmodule AshGraphql do
end
end
@pipeline_modifier AshTypes
@pipeline_modifier Module.concat(api, AshTypes)
end
end

View file

@ -562,6 +562,7 @@ defmodule AshGraphql.Resource do
defp field_type(Ash.Type.String), do: :string
defp field_type(Ash.Type.UUID), do: :string
defp field_type(Ash.Type.Integer), do: :integer
defp field_type(Ash.Type.Boolean), do: :boolean
defp field_type({:array, type}) do
%Absinthe.Blueprint.TypeReference.List{