I am working on a project we got and we have a bunch of GraphQL queries.
The backend is Laravel, with lighthouse. The model uses soft deletes.
Even so, the queries return with soft deleted rows that produce Cannot return null for non-nullable
errors.
I explicitly set also, by hand, to the query to only fetch whereNull('deleted_at')
or where('deleted_at', null)
, to no avail.
When debugging the query to get the results, before renderirng graphql response, the query does not contain these rows.
I then proceeded to also delete rows from the DB, but still getting the same error. This is driving me nuts. All caches (to my knowledge) have been deleted.
By analyzing the path
variable on the error message, I get:
"path": [
"marketplaceItems",
928,
"unit",
"entity"
],
To my understanding, this means marketplace item with id: 928, or doesn't it? Because 928 has been deleted from the DB... Is there any other way to interpret this?
Is there somewhere else to look? Is there a place where responses get cached, other than application caches?