From c74f76f8a0b43acbf1e7fd9efd42adc53df17cda Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Wed, 2 Sep 2020 00:52:51 -0400 Subject: [PATCH] fix: use module name specific to the api fix: support booleans --- lib/ash_graphql.ex | 4 ++-- lib/resource/resource.ex | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ash_graphql.ex b/lib/ash_graphql.ex index 9020bcd..c6cf90c 100644 --- a/lib/ash_graphql.ex +++ b/lib/ash_graphql.ex @@ -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 diff --git a/lib/resource/resource.ex b/lib/resource/resource.ex index 0711b80..4194ad2 100644 --- a/lib/resource/resource.ex +++ b/lib/resource/resource.ex @@ -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{