Recently the Events structure has changed in the backend, as a result, frontend pages now have Graphql Error.
There are 2 scopes of a problem:
Homepage
AnimalDetails
The query is invalid (does not comply with the new scheme), triggering an Error in the Graphql page component query part.
Let's use a short query to get the Events info in both scopes:
{ events { id, animalId, group, type, dateTime, createTime author }}
This info is just enough to render the events list. Event details should be queried only in Event previews, but not here.
events query can have params for filtering in the Animal Details page:
events(animalId: 2, groups: [General, Medical]) - in the groups, we have an array and can specify 1 or many groups.
Please connect the Event filtering UI to the query with these group params.
Note, #190 will have an effect on that. Fixes in this PR will render the list (which was not present), but will not use the Event data.
So Icon, Author, dates and proper Event title are still missing.
Recently the Events structure has changed in the backend, as a result, frontend pages now have Graphql Error. There are 2 scopes of a problem:
Let's use a short query to get the Events info in both scopes:
{ events { id, animalId, group, type, dateTime, createTime author }}
This info is just enough to render the events list. Event details should be queried only in Event previews, but not here.events
query can have params for filtering in the Animal Details page:events(animalId: 2, groups: [General, Medical])
- in the groups, we have an array and can specify 1 or many groups. Please connect the Event filtering UI to the query with these group params.