We have an "email" entity that has a list of recipient_ids (stored as UUIDs in Cassandra). These ids are associated with an "account" entity. We have separate APIs for each object type(entity) and one that performs the stitching. Using stitching we are attempting to stitch these together, the attempts are below.
The "accounts" function referenced in the path takes in a list of ids as Guids and returns a list of account details for the ids passed in (signature below). The "accounts" function works directly by passing in a list like this: "account_ids": [ "bda43f54-afc3-48a3-8f9a-cbaee4ff7d8a", "1766b5c2-7c05-418d-b00f-14e60b752483" ] the list of recipients is in the same format.
Both stitching lines return the following error:
"message": "UUID cannot parse the given value of type HotChocolate.Language.StringValueNode
."
stitching:
extend type Email { recipients: [Account] @delegate(schema: ""Account"", path:""accounts(account_ids: [$fields:recipient_ids] )"") } ");
extend type Email { recipients: [Account] @delegate(schema: ""Account"", path:""accounts(account_ids: $fields:recipient_ids )"") } ");
Accounts Signature:
public async Task<List<Account>?> Accounts([GraphQLDescription("The Id of an organization.")] List<Guid>? account_ids, [Service] IHttpContextAccessor httpContextAccessor)
Is there an issue with the stitching?
The way I interrupt the error message the issue is with the field recipient_ids that is being passed into the stitching path function. The recipient_ids field is a list of UUIDs going into a query that takes a list of UUIDs, so I am not sure why the error is being thrown.
Any insight into this issue is greatly appreciated.
Thanks
I have tried passing a list of strings into the accounts function.