#NEWLINE# def test_merges_parallel_fragments( ) : #NEWLINE# #INDENT# ast = parse ( '\n        { a, ...FragOne, ...FragTwo }\n\n        fragment FragOne on Type {\n            b\n            deep { b, deeper: deep { b } }\n        }\n\n        fragment FragTwo on Type {\n            c\n            deep { c, deeper: deep { c } }\n        }\n    ' ) #NEWLINE# Type = GraphQLObjectType ( 'Type' , ( lambda : { #NEWLINE# #INDENT# 'a' : GraphQLField ( GraphQLString , resolver = ( lambda * _ : 'Apple' ) ) , #NEWLINE# 'b' : GraphQLField ( GraphQLString , resolver = ( lambda * _ : 'Banana' ) ) , #NEWLINE# 'c' : GraphQLField ( GraphQLString , resolver = ( lambda * _ : 'Cherry' ) ) , #NEWLINE# 'deep' : GraphQLField ( Type , resolver = ( lambda * _ : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# schema = GraphQLSchema ( query = Type ) #NEWLINE# result = execute ( schema , None , result ) #NEWLINE# assert ( not result . errors ) #NEWLINE# assert ( result . data == { #NEWLINE# #INDENT# 'a' : 'Apple' , #NEWLINE# 'b' : 'Banana' , #NEWLINE# 'c' : 'Cherry' , #NEWLINE# 'deep' : { #NEWLINE# #INDENT# 'b' : 'Banana' , #NEWLINE# 'c' : 'Cherry' , #NEWLINE# 'deeper' : { #NEWLINE# #INDENT# 'b' : 'Banana' , #NEWLINE# 'c' : 'Cherry' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } )