GraphQL - filter by lastUpdatedAt
It would be preferable to be able to filter GraphQL queries by lastUpdatedAt for any item where that information exists. Ideally, that should be pretty much anything. We can filter on CreatedAt, which is a start if we only wanted new nodes, but doesn't help with modified entries.
Currently we have webhooks firing for every modification to anything we can attach a webhook to, so our internal systems can keep up to date with what's in Administrate. This is quite a load on both our systems and (I would imagine) the Administrate instance.
While there would be more of an update lag, I would far prefer to be able to call in and find what's changed/new since the last check when we need the information but currently that would involve querying every entry in the system. Even if it is just an ID and lastUpdatedAt info, we have far too many contacts to be realistically doing that.
For reference, if not 'pretty much everything' we're looking at Account, Contact, Opportunity, Event, CourseTemplate, and Learner plus Invoices and Tasks which we can't do on a webhook anyway.
-
Today's discovery: some types have updatedAt options. Events only have updatedAt and no createdAt, and several have neither updated or created dates.
Learners have updated, but it's labelled differently.
- Accounts: createdAt
- Contacts: neither
- Opportunities: createdAt, updatedAt
- Events: only updatedAt (!? I guess that covers created at as well, a bit...)
- CourseTemplates: neither
- Learners: createdAt, lastUpdatedAt
- Invoices: createdAt
- Tasks: dueDate, but neither of the others.
Please sign in to leave a comment.
Comments
2 comments