Calendar.parse(date) do {:ok, date} -> Map.put(filters, :date, date) _ -> filters end end def add_filter(key, value, filters) do Map.put(filters, key, value) end
Ben Wilson @benwilson512 def events(filters, _) do ... end field :events, list_of(:event) do arg :date, :date arg :location_id, :id arg :name, :string resolve &events/2 end
scalar type represents textual data, represented as UTF-8 character sequences. ... """ scalar :string do serialize &to_string/1 parse &parse_string/1 end
a meeting or conference """ object :event do @desc "The date on which the event occurs" field :date, non_null(:date) @desc "The location at which the event happens" field :location, non_null(:location) @desc "The name of the event" field :name, non_null(:string) field :attendees, list_of(:person) end
schema. Types must exist if referenced. object :organization do field :name, :string field :users, list_of(:usre) end http://absinthe-graphql.org Ben Wilson @benwilson512
the Star Wars saga" node object :faction do @desc "The name of the faction" field :name, :string @desc "The ships used by the faction." connection field :ships, node_type: :ship do resolve &Ship.list/2 end end