I have two queries which look like this:
const GetPayablesQuery = gql`
query GetPayableInvoicesQuery(
$paging: PagingGqlInputOfPayableInvoiceSortColumnGqlInput!
$teamId: HashId!
$filter: PayableInvoiceQueryFilterInput
) {
team(teamId: $teamId) {
payableInvoices(paging: $paging, filter: $filter) {
items {
...PayableInvoiceFields
}
numPages
pageNum
pageSize
totalCount
}
}
}
${PayableInvoiceFieldsFragment}
`;
const GetPayableQuery = gql`
query GetPayableInvoiceQuery($payableInvoiceId: HashId!, $teamId: HashId!) {
team(teamId: $teamId) {
payableInvoice(payableInvoiceId: $payableInvoiceId) {
...PayableInvoiceFields
}
}
}
${PayableInvoiceFieldsFragment}
`;
When I call the GetPayableQuery I thought it would merge the result into the cached items from the first query but it doesnt.
Fragment:
const PayableInvoiceFieldsFragment = gql`
fragment PayableInvoiceFields on PayableInvoice {
amount
attachments {
pageFiles
url
}
canCancel
canMarkAsPaid
canPayNow
canChangePaymentSource
currency
dueDate
fundingSource {
id
mask
name
type
}
id
invoiceNumber
issueDate
paymentDate
paymentOptionRowVersion {
value
}
rowVersion {
value
}
status
vendor {
name
email
id
}
}
`;
8