[day-03] expose id in user schema
Use uuid custom scalar to represent the user id.
This commit is contained in:
parent
c5612f9398
commit
425c3eafc2
@ -1,8 +1,11 @@
|
|||||||
defmodule WabanexWeb.Schema.Types.User do
|
defmodule WabanexWeb.Schema.Types.User do
|
||||||
use Absinthe.Schema.Notation
|
use Absinthe.Schema.Notation
|
||||||
|
|
||||||
|
import_types WabanexWeb.Schema.Types.Custom.UUID4
|
||||||
|
|
||||||
@desc "Logic user representation"
|
@desc "Logic user representation"
|
||||||
object :user do
|
object :user do
|
||||||
|
field :id, non_null(:uuid4)
|
||||||
field :name, non_null(:string)
|
field :name, non_null(:string)
|
||||||
field :email, non_null(:string)
|
field :email, non_null(:string)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user