I have a simple query. But on each refetch sometimes car fields are null or contact fields, or both. I have no clue why, some help debugging would be great.
query Dashboard($today: DateTime! = "2024-02-20T01:53:31Z") {
CarsStatistics {
count {
total
noStatus
financing
leasing
purchaseOption
rentToOwn
}
}
FinanceStatistics {
revenue {
total
cost
profit
}
}
# TODO: pagination
Reminders(
draft: false
sort: "date"
where: { done: { equals: false } }
limit: 9999
) {
docs {
id
title
date
done
car {
id
manufacturer
model
licensePlate
}
contact {
relationTo
value {
__typename
... on Person {
id
firstName
lastName
}
... on Company {
id
name
}
}
}
}
}
Contracts(
limit: 15
sort: "endDate"
where: {
AND: [
{ _status: { equals: published } }
{ endDate: { greater_than_equal: $today } }
{ startDate: { less_than_equal: $today } }
]
}
) {
docs {
id
car {
id
manufacturer
model
licensePlate
}
customer {
relationTo
value {
__typename
... on Person {
id
firstName
lastName
}
... on Company {
id
name
}
}
}
startDate
endDate
}
}
}