Files
probo/pkg/server/api/console/v1/graphql/audit_log.graphql
Émile Ré 31cca05ca4 Split GraphQL schemas into per-entity files
Split each API's monolithic schema.graphql into per-coredata-model
files under graphql/ subdirectories. gqlgen's follow-schema layout
with {name}.resolvers.go template generates one resolver file per
schema file. Relay uses schema + schemaExtensions to load the split
files.

Connect API: 8 files (base, session, organization, profile,
personal_api_key, saml, scim, audit_log)

Trust API: 5 files (base, trust_center, auth, nda, mailing_list)

Console API: 25 files covering all domain entities

Types extended across files (Organization, Mutation, Viewer,
TrustCenter, Identity) are defined in base.graphql as required by
Relay's schemaExtensions.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-15 09:19:38 +04:00

82 lines
1.9 KiB
GraphQL

extend type Organization {
auditLogEntries(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: AuditLogEntryOrder
filter: AuditLogEntryFilter
): AuditLogEntryConnection! @goField(forceResolver: true)
}
enum AuditLogActorType
@goModel(
model: "go.probo.inc/probo/pkg/coredata.AuditLogActorType"
) {
USER
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.AuditLogActorTypeUser"
)
API_KEY
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.AuditLogActorTypeAPIKey"
)
SYSTEM
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.AuditLogActorTypeSystem"
)
}
enum AuditLogEntryOrderField
@goModel(
model: "go.probo.inc/probo/pkg/coredata.AuditLogEntryOrderField"
) {
CREATED_AT
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.AuditLogEntryOrderFieldCreatedAt"
)
}
input AuditLogEntryOrder
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.AuditLogEntryOrderBy"
) {
field: AuditLogEntryOrderField!
direction: OrderDirection!
}
input AuditLogEntryFilter {
action: String
actorId: ID
resourceType: String
resourceId: ID
}
type AuditLogEntry implements Node {
id: ID!
organization: Organization @goField(forceResolver: true)
actorId: ID!
actorType: AuditLogActorType!
action: String!
resourceType: String!
resourceId: ID!
metadata: String
createdAt: Datetime!
permission(action: String!): Boolean! @goField(forceResolver: true)
}
type AuditLogEntryConnection
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.AuditLogEntryConnection"
) {
edges: [AuditLogEntryEdge!]!
pageInfo: PageInfo!
totalCount: Int! @goField(forceResolver: true)
}
type AuditLogEntryEdge {
cursor: CursorKey!
node: AuditLogEntry!
}