lib/graph_ql/introspection/fields_field.rb in graphql-0.3.0 vs lib/graph_ql/introspection/fields_field.rb in graphql-0.4.0

- old
+ new

@@ -3,9 +3,10 @@ f.type -> { type[!GraphQL::Introspection::FieldType] } f.arguments({ includeDeprecated: arg.build({type: GraphQL::BOOLEAN_TYPE, default_value: false}) }) f.resolve -> (object, arguments, context) { + return nil if !object.kind.fields? fields = object.fields.values if !arguments["includeDeprecated"] fields = fields.select {|f| !f.deprecation_reason } end fields