Files
omega-server/local/graphql/schema/schema.graphql
2025-07-06 19:19:36 +02:00

101 lines
1.5 KiB
GraphQL

# Minimal GraphQL Schema for Phase 1
# Core Types
type User {
id: String!
email: String!
fullName: String
createdAt: String!
updatedAt: String!
}
type Project {
id: String!
name: String!
description: String
ownerId: String!
createdAt: String!
updatedAt: String!
}
type Task {
id: String!
title: String!
description: String
status: String!
priority: String!
projectId: String!
createdAt: String!
updatedAt: String!
}
# Input Types
input LoginInput {
email: String!
password: String!
}
input UserCreateInput {
email: String!
fullName: String!
password: String!
}
input ProjectCreateInput {
name: String!
description: String
ownerId: String!
}
input TaskCreateInput {
title: String!
description: String
status: String
priority: String
projectId: String!
}
# Response Types
type AuthResponse {
token: String!
user: User!
}
type MessageResponse {
message: String!
success: Boolean!
}
# Queries
type Query {
# Authentication
me: User!
# Users
users: [User!]!
user(id: String!): User
# Projects
projects: [Project!]!
project(id: String!): Project
# Tasks
tasks(projectId: String): [Task!]!
task(id: String!): Task
}
# Mutations
type Mutation {
# Authentication
login(input: LoginInput!): AuthResponse!
# Users
createUser(input: UserCreateInput!): User!
# Projects
createProject(input: ProjectCreateInput!): Project!
# Tasks
createTask(input: TaskCreateInput!): Task!
}