From 8787973075536e895dad8661ba7525d1057976e7 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 24 Jun 2021 00:07:58 +0000 Subject: [PATCH] [day-03] create user schema Add user type to represent entity in graphql. --- lib/wabanex_web/schema/types/user.ex | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/wabanex_web/schema/types/user.ex diff --git a/lib/wabanex_web/schema/types/user.ex b/lib/wabanex_web/schema/types/user.ex new file mode 100644 index 0000000..364cd2b --- /dev/null +++ b/lib/wabanex_web/schema/types/user.ex @@ -0,0 +1,9 @@ +defmodule WabanexWeb.Schema.Types.User do + use Absinthe.Schema.Notation + + @desc "Logic user representation" + object :user do + field :name, non_null(:string) + field :email, non_null(:string) + end +end