File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -366,25 +366,17 @@ impl<'a> Join<'a> {
366
366
/// Construct a `Join` based on the parent field pointing to the child
367
367
fn new (
368
368
schema : & ' a ApiSchema ,
369
- parent_type : ObjectOrInterface < ' a > ,
369
+ parent_type : & ' a s :: ObjectType ,
370
370
child_type : ObjectOrInterface < ' a > ,
371
371
field_name : & str ,
372
372
) -> Self {
373
- let parent_types = parent_type
374
- . object_types ( schema. schema ( ) )
375
- . expect ( "the name of the parent type is valid" ) ;
376
373
let child_types = child_type
377
374
. object_types ( schema. schema ( ) )
378
375
. expect ( "the name of the child type is valid" ) ;
379
376
380
- let conds = parent_types
377
+ let conds = child_types
381
378
. iter ( )
382
- . flat_map :: < Vec < _ > , _ > ( |parent_type| {
383
- child_types
384
- . iter ( )
385
- . map ( |child_type| JoinCond :: new ( parent_type, child_type, field_name) )
386
- . collect ( )
387
- } )
379
+ . map ( |child_type| JoinCond :: new ( parent_type, child_type, field_name) )
388
380
. collect ( ) ;
389
381
390
382
Join { child_type, conds }
@@ -576,7 +568,7 @@ fn execute_selection_set<'a>(
576
568
577
569
let join = Join :: new (
578
570
ctx. query . schema . as_ref ( ) ,
579
- object_type. into ( ) ,
571
+ object_type,
580
572
child_type,
581
573
& field. name ,
582
574
) ;
You can’t perform that action at this time.
0 commit comments