graphql-hive
graphql-hive copied to clipboard
Audit log GraphQL API
Background
This pull request introduces new modules titled Audit Log. The audit logs comprehensively document all user activities and system events, organized by each organization.
Description
- A new GraphQL schema has been established, along with the creation of an interface named
AuditLog
. - Audit log cases have been implemented by developing a new type that adheres to the
AuditLog
interface. - A new provider, named
AuditLogManager
, has been created withClickhouse
to facilitate database updates. This provider offers three primary functions:
-
createLogAuditEvent
: Utilized for inserting new log/event data. -
getPaginatedAuditLogs
: Employed for retrieving all data from the database. -
getAuditLogsCount
: Used to count the total number of records in the database.
- The provider oversees the event/record type through a new type called
AuditLogEvent
, with each case accompanied by azod
schema to enhance type safety. - Currently, I have included a single example of a case that records user activity - you can see it here, and I welcome feedback on the next steps.
@kamilkisiela @dotansimha @n1ru4l I would appreciate your thoughts on this and any suggestions for modifications