From 425c3eafc2ab68cb5e64029d820c0e6d91486eb2 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 24 Jun 2021 00:12:17 +0000 Subject: [PATCH] [day-03] expose id in user schema Use uuid custom scalar to represent the user id. --- lib/wabanex_web/schema/types/user.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/wabanex_web/schema/types/user.ex b/lib/wabanex_web/schema/types/user.ex index 364cd2b..e1e0187 100644 --- a/lib/wabanex_web/schema/types/user.ex +++ b/lib/wabanex_web/schema/types/user.ex @@ -1,8 +1,11 @@ defmodule WabanexWeb.Schema.Types.User do use Absinthe.Schema.Notation + import_types WabanexWeb.Schema.Types.Custom.UUID4 + @desc "Logic user representation" object :user do + field :id, non_null(:uuid4) field :name, non_null(:string) field :email, non_null(:string) end