Open
Description
Describe the bug
Accessing a resource from the mockStore
that doesn't exist doesn't handle the situation well. It complains about the DateTime
not being defined, and not that the resource access attempt is invalid.
This is how I handle the resource detail:
resourceDetail: (_, { id }, { mockStore }) => {
// here I'd like to check if the resource exists and then return a handled error
return mockStore.get('ResourceDetail', id);
},
I assume I should protect the endpoint, but how can this be done with the mockStore?