vesper icon indicating copy to clipboard operation
vesper copied to clipboard

Batch resolve method should be invoked N times for N aliases with different arguments.

Open gregwym opened this issue 6 years ago • 0 comments

vesper: 0.1.9

Consider the following query

{
  queryA {
    entitiesA {
      aRelations: relations(filter: A)
      bRelations: relations(filter: B)
    }
  }
}

In the resolver for EntityA, we have a @Resolve method async relations(entities: EntityA[]).

Current behavior

  1. Resolver method is only being invoked once with { filter: A }
  2. the result for bRelations are the same as result for aRelations

Expected behavior

  1. Resolver method should be invoked twice with both { filter: A } and { filter: B }
  2. the result for bRelations should be corresponding the { filter: B }

gregwym avatar Oct 23 '18 14:10 gregwym