lib/graph_ql/introspection/fields_field.rb in graphql-0.1.0 vs lib/graph_ql/introspection/fields_field.rb in graphql-0.2.0

- old
+ new

@@ -1,14 +1,14 @@ -GraphQL::FieldsField = GraphQL::Field.new do |f| +GraphQL::Introspection::FieldsField = GraphQL::Field.new do |f, type, field, arg| f.description "List of fields on this object" - f.type -> { GraphQL::ListType.new(of_type: GraphQL::NonNullType.new(of_type: GraphQL::FieldType)) } + f.type -> { type[!GraphQL::Introspection::FieldType] } f.arguments({ - includeDeprecated: {type: GraphQL::BOOLEAN_TYPE, default_value: false} + includeDeprecated: arg.build({type: GraphQL::BOOLEAN_TYPE, default_value: false}) }) f.resolve -> (object, arguments, context) { fields = object.fields.values if !arguments["includeDeprecated"] - fields = fields.select {|f| !f.deprecated? } + fields = fields.select {|f| !f.deprecation_reason } end fields } end