[extra-01] use date_range to represent training period
Adjust graphql training object and input to use date_range type as a representation for period field.
This commit is contained in:
parent
24a2c516c5
commit
f07965afa4
@ -1,20 +1,19 @@
|
||||
defmodule WabanexWeb.Schema.Types.Training do
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
import_types WabanexWeb.Schema.Types.Custom.DateRange
|
||||
import_types WabanexWeb.Schema.Types.Exercise
|
||||
|
||||
@desc "Logic training representation"
|
||||
object :training do
|
||||
field :id, non_null(:uuid4)
|
||||
field :start_date, non_null(:string)
|
||||
field :end_date, :string
|
||||
field :period, non_null(:date_range)
|
||||
field :exercises, non_null(list_of(:exercise))
|
||||
end
|
||||
|
||||
input_object :create_training_input do
|
||||
field :user_id, non_null(:uuid4)
|
||||
field :start_date, non_null(:string)
|
||||
field :end_date, :string
|
||||
field :period, non_null(:date_range)
|
||||
field :exercises, non_null(list_of(:create_exercise_input))
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user