@@ -658,15 +658,15 @@ def extends_objects_by_adding_new_fields_with_arguments():
658658 assert validate_schema (extended_schema ) == []
659659 assert print_schema_changes (schema , extended_schema ) == dedent (
660660 """
661+ type SomeObject {
662+ newField(arg1: String, arg2: NewInputObj!): String
663+ }
664+
661665 input NewInputObj {
662666 field1: Int
663667 field2: [Float]
664668 field3: String!
665669 }
666-
667- type SomeObject {
668- newField(arg1: String, arg2: NewInputObj!): String
669- }
670670 """
671671 )
672672
@@ -778,8 +778,7 @@ def extends_objects_by_including_new_types():
778778 assert validate_schema (extended_schema ) == []
779779
780780 assert print_schema_changes (schema , extended_schema ) == dedent (
781- new_types_sdl
782- + """
781+ """
783782 type SomeObject {
784783 oldField: String
785784 newObject: NewObject
@@ -788,8 +787,8 @@ def extends_objects_by_including_new_types():
788787 newScalar: NewScalar
789788 newEnum: NewEnum
790789 newTree: [SomeObject]!
791- }
792- """
790+ }\n """
791+ + new_types_sdl
793792 )
794793
795794 def extends_objects_by_adding_implemented_new_interfaces ():
@@ -824,12 +823,12 @@ def extends_objects_by_adding_implemented_new_interfaces():
824823 assert validate_schema (extended_schema ) == []
825824 assert print_schema_changes (schema , extended_schema ) == dedent (
826825 """
827- interface NewInterface {
826+ type SomeObject implements OldInterface & NewInterface {
827+ oldField: String
828828 newField: String
829829 }
830830
831- type SomeObject implements OldInterface & NewInterface {
832- oldField: String
831+ interface NewInterface {
833832 newField: String
834833 }
835834 """
@@ -917,28 +916,27 @@ def extends_different_types_multiple_times():
917916
918917 assert validate_schema (extended_schema ) == []
919918 assert print_schema_changes (schema , extended_schema ) == dedent (
920- new_types_sdl
921- + """
919+ """
920+ type SomeObject implements SomeInterface & NewInterface & AnotherNewInterface {
921+ oldField: String
922+ newField: String
923+ anotherNewField: String
924+ }
925+
922926 enum SomeEnum {
923927 OLD_VALUE
924928 NEW_VALUE
925929 ANOTHER_NEW_VALUE
926930 }
927931
928- input SomeInput {
929- oldField: String
930- newField: String
931- anotherNewField: String
932- }
932+ union SomeUnion = SomeObject | NewObject | AnotherNewObject
933933
934- type SomeObject implements SomeInterface & NewInterface & AnotherNewInterface {
934+ input SomeInput {
935935 oldField: String
936936 newField: String
937937 anotherNewField: String
938- }
939-
940- union SomeUnion = SomeObject | NewObject | AnotherNewObject
941- """ # noqa: E501
938+ }\n """ # noqa: E501
939+ + new_types_sdl
942940 )
943941
944942 def extends_interfaces_by_adding_new_fields ():
@@ -981,12 +979,12 @@ def extends_interfaces_by_adding_new_fields():
981979 assert validate_schema (extended_schema ) == []
982980 assert print_schema_changes (schema , extended_schema ) == dedent (
983981 """
984- interface AnotherInterface implements SomeInterface {
982+ interface SomeInterface {
985983 oldField: String
986984 newField: String
987985 }
988986
989- interface SomeInterface {
987+ interface AnotherInterface implements SomeInterface {
990988 oldField: String
991989 newField: String
992990 }
@@ -1043,12 +1041,12 @@ def extends_interfaces_by_adding_new_implemented_interfaces():
10431041 newField: String
10441042 }
10451043
1046- interface NewInterface {
1044+ type SomeObject implements SomeInterface & AnotherInterface & NewInterface {
1045+ oldField: String
10471046 newField: String
10481047 }
10491048
1050- type SomeObject implements SomeInterface & AnotherInterface & NewInterface {
1051- oldField: String
1049+ interface NewInterface {
10521050 newField: String
10531051 }
10541052 """
@@ -1162,16 +1160,16 @@ def may_extend_mutations_and_subscriptions():
11621160 assert print_schema (mutation_schema ) == original_print
11631161 assert print_schema (extended_schema ) == dedent (
11641162 """
1165- type Mutation {
1166- mutationField: String
1167- newMutationField: Int
1168- }
1169-
11701163 type Query {
11711164 queryField: String
11721165 newQueryField: Int
11731166 }
11741167
1168+ type Mutation {
1169+ mutationField: String
1170+ newMutationField: Int
1171+ }
1172+
11751173 type Subscription {
11761174 subscriptionField: String
11771175 newSubscriptionField: Int
0 commit comments