Files
probo/pkg/server/api/connect/v1/graphql/session.graphql
Émile Ré 5f93071b20 Consolidate hub type definitions into their own files
Move Organization, Identity, TrustCenter, and Viewer definitions to
include all their connection fields directly, removing all extend type
blocks for these hub types from entity files.

This eliminates the Relay schemaExtensions constraint where extend type
could only target types defined in the main schema file. Entity files
now only define their own standalone types and extend type Mutation.

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

160 lines
2.7 KiB
GraphQL

enum SessionOrderField
@goModel(model: "go.probo.inc/probo/pkg/coredata.SessionOrderField") {
CREATED_AT
@goEnum(value: "go.probo.inc/probo/pkg/coredata.SessionOrderFieldCreatedAt")
EXPIRED_AT
@goEnum(value: "go.probo.inc/probo/pkg/coredata.SessionOrderFieldExpiredAt")
UPDATED_AT
@goEnum(value: "go.probo.inc/probo/pkg/coredata.SessionOrderFieldUpdatedAt")
}
input SessionOrder {
direction: OrderDirection!
field: SessionOrderField!
}
type Session implements Node {
id: ID!
identity: Identity @goField(forceResolver: true)
ipAddress: String!
userAgent: String!
updatedAt: Datetime!
createdAt: Datetime!
expiresAt: Datetime!
permission(action: String!): Boolean!
@goField(forceResolver: true)
@session(required: PRESENT)
}
type SessionConnection
@goModel(
model: "go.probo.inc/probo/pkg/server/api/connect/v1/types.SessionConnection"
) {
edges: [SessionEdge!]!
pageInfo: PageInfo!
totalCount: Int @goField(forceResolver: true)
}
type SessionEdge {
node: Session!
cursor: CursorKey!
}
input SignInInput {
organizationId: ID
email: EmailAddr!
password: String!
}
input SignUpInput {
email: EmailAddr!
password: String!
fullName: String!
}
input ActivateAccountInput {
token: String!
}
input ForgotPasswordInput {
email: EmailAddr!
}
input ResetPasswordInput {
token: String!
password: String!
}
input VerifyEmailInput {
token: String!
}
input ChangePasswordInput {
currentPassword: String!
newPassword: String!
}
input ChangeEmailInput {
newEmail: EmailAddr!
password: String!
}
input AssumeOrganizationSessionInput {
organizationId: ID!
continue: String!
}
input RevokeSessionInput {
sessionId: ID!
}
type SignInPayload {
identity: Identity
session: Session
}
type SignUpPayload {
identity: Identity
}
type SignOutPayload {
success: Boolean!
}
type ActivateAccountPayload {
createPasswordToken: String
ssoLoginUrl: String
profile: Profile
}
type ForgotPasswordPayload {
success: Boolean!
}
type ResetPasswordPayload {
success: Boolean!
}
type VerifyEmailPayload {
success: Boolean!
}
type ChangePasswordPayload {
success: Boolean!
}
type ChangeEmailPayload {
success: Boolean!
}
union AssumeOrganizationSessionResult =
| OrganizationSessionCreated
| PasswordRequired
| SAMLAuthenticationRequired
type OrganizationSessionCreated {
session: Session!
membership: Membership!
}
type PasswordRequired {
reason: ReauthenticationReason!
}
type SAMLAuthenticationRequired {
reason: ReauthenticationReason!
}
type AssumeOrganizationSessionPayload {
result: AssumeOrganizationSessionResult!
}
type RevokeSessionPayload {
success: Boolean!
}
type RevokeAllSessionsPayload {
revokedCount: Int!
}