Open amitksingh1490 opened 1 week ago
I have a use case involving two APIs, each returning lists in the following formats:
API 1 Response:
[ { "id": 1, "username": "abc", "address": { "home": "123 st" } }, { "id": 2, "username": "xyz", "address": { "home": "789 st" } } ]
API 2 Response:
[ { "id": 3, "username": "pqr", "address": { "office": "123 st" } }, { "id": 4, "username": "lmn", "address": { "office": "789 st" } } ]
I want to concatenate these lists into a single result while mapping the address field to a GraphQL union type defined as follows:
address
type User { id: ID! username: String address: Address } union Address = Home | Office type Home { home: String } type Office { office: String }
The system should support merging these lists and transforming the address field into the appropriate Home or Office type based on the input.
Home
Office
Should be solved using https://github.com/tailcallhq/tailcall/issues/3120
Description:
I have a use case involving two APIs, each returning lists in the following formats:
API 1 Response:
API 2 Response:
I want to concatenate these lists into a single result while mapping the
address
field to a GraphQL union type defined as follows:The system should support merging these lists and transforming the
address
field into the appropriateHome
orOffice
type based on the input.