Skip to main content

user

User accounts for authentication and access control.
type user {
  id: Int!
  name: String
  email: String!
  emailVerified: Date
  image: String
  password: String
  type: String        # "api" | "user"
  apikey: String
  role: ID
  super_admin: Boolean
  createdAt: Date!
  updatedAt: Date!
}
Example query:
query {
  usersPagination(
    filters: [{ type: { eq: "user" } }]
  ) {
    items {
      id
      name
      email
      role
      super_admin
    }
  }
}
The password and apikey fields are write-only for security. They are hashed with bcrypt and cannot be retrieved.

role

Role definitions for RBAC.
type role {
  id: ID!
  name: String!
  agents: String      # "read" | "write"
  evals: String
  workflows: String
  variables: String
  users: String
  api: String
  createdAt: Date!
  updatedAt: Date!
}
Example mutation:
mutation {
  rolesCreateOne(
    input: {
      name: "Developer"
      agents: "write"
      evals: "write"
      workflows: "read"
      variables: "read"
      users: "read"
    }
  ) {
    item {
      id
      name
    }
  }
}

Permission Levels

Roles support two permission levels for each resource type:
  • read - View resources
  • write - View and modify resources