From 28d2d9b363f4d52580756cc803124e4a910b5fa3 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Fri, 4 Sep 2020 00:59:32 -0400 Subject: [PATCH] fix: Fix identities (#110) --- .github/workflows/elixir.yml | 6 +++--- lib/ash.ex | 4 ++++ lib/ash/resource/identity.ex | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 7cd9933d..ced8fc0f 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -127,9 +127,9 @@ jobs: strategy: fail-fast: false matrix: - project: - [ - "ash_postgres", + project: [ + # We can't reasonably test ash_postgres without including database configuration here, which is a bit much at the moment + # "ash_postgres", "ash_csv", "ash_graphql", "ash_json_api", diff --git a/lib/ash.ex b/lib/ash.ex index a0e167d6..aaf9bc72 100644 --- a/lib/ash.ex +++ b/lib/ash.ex @@ -102,6 +102,10 @@ defmodule Ash do |> Enum.any?(&(&1 == behaviour)) end + def uuid do + Ecto.UUID.generate() + end + @doc "Returns all extensions of a resource or api" @spec extensions(resource() | api()) :: [module] def extensions(resource) do diff --git a/lib/ash/resource/identity.ex b/lib/ash/resource/identity.ex index 8acc4d2e..f7f16eda 100644 --- a/lib/ash/resource/identity.ex +++ b/lib/ash/resource/identity.ex @@ -4,7 +4,7 @@ defmodule Ash.Resource.Identity do @schema [ name: [ - type: {:custom, __MODULE__, :keys, []}, + type: :atom, required: true, doc: "The name of the identity. Used by extensions to target specific identities for fetching single instances of a resource"