spec/support/dummy/schema.rb in graphql-1.5.4 vs spec/support/dummy/schema.rb in graphql-1.5.5

- old
+ new

@@ -166,10 +166,19 @@ type !GraphQL::STRING_TYPE resolve ->(t, a, c) { raise GraphQL::ExecutionError, "BOOM" } end end + ResourceOrderType = GraphQL::InputObjectType.define { + name "ResourceOrderType" + description "Properties used to determine ordering" + + argument :direction, !types.String do + description "ASC or DESC" + end + } + DairyProductInputType = GraphQL::InputObjectType.define { name "DairyProductInput" description "Properties for finding a dairy product" input_field :source, !DairyAnimalEnum do # ensure we can define description in block @@ -186,9 +195,11 @@ default_value 0.3 end # ensure default can be false input_field :organic, types.Boolean, default_value: false + + input_field :order_by, -> { ResourceOrderType }, default_value: { direction: 'ASC' } } DeepNonNullType = GraphQL::ObjectType.define do name "DeepNonNull" field :nonNullInt, !types.Int do