0

I'm using HotChocolate GraphQL to implement schema federation, the basic setup is working.

I'm attempting to extend a type from one of our downstream services using a delegated resolver and the extend type syntax.

I have the following type defined in service A:

type Foo {
  id: Int
}

Service B is attempting to extend this type with the following extension:

extend type Foo {
  Bar: Int @delegate(schema: "ServiceB", path: "getUsers(userId: $fields:userId).userId")
}

The problem i'm having is the result of the getUsers query happens to be a collection, but the new property Bar on Foo is a singular Int.

Is there a way I can perform this mapping? I would prefer not to add an additional query to support this.

Thanks

cmpbedes
  • 473
  • 1
  • 5
  • 13

0 Answers0