From c4f178c52a3edec81517827fda149da67602db3c Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Thu, 1 Feb 2018 14:56:31 -0500 Subject: [PATCH] Fix printing object type definitions Directives come after the implemented interfaces. See https://github.com/graphql/graphql-js/blob/360fa06e43fed32b63fba99b353515e7b56eee20/src/language/printer.js#L117-L129 for the canonical printer. --- lib/graphql/language/printer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graphql/language/printer.rb b/lib/graphql/language/printer.rb index 3601cb53386..ec98542a368 100644 --- a/lib/graphql/language/printer.rb +++ b/lib/graphql/language/printer.rb @@ -154,8 +154,8 @@ def print_scalar_type_definition(scalar_type) def print_object_type_definition(object_type) out = print_description(object_type) out << "type #{object_type.name}" - out << print_directives(object_type.directives) out << " implements " << object_type.interfaces.map(&:name).join(", ") unless object_type.interfaces.empty? + out << print_directives(object_type.directives) out << print_field_definitions(object_type.fields) end