Skip to content

Commit c4f178c

Browse files
committed
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.
1 parent c43198d commit c4f178c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/graphql/language/printer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ def print_scalar_type_definition(scalar_type)
154154
def print_object_type_definition(object_type)
155155
out = print_description(object_type)
156156
out << "type #{object_type.name}"
157-
out << print_directives(object_type.directives)
158157
out << " implements " << object_type.interfaces.map(&:name).join(", ") unless object_type.interfaces.empty?
158+
out << print_directives(object_type.directives)
159159
out << print_field_definitions(object_type.fields)
160160
end
161161

0 commit comments

Comments
 (0)