taskcafe/api/graph/schema.graphqls
2020-04-19 22:02:55 -05:00

217 lines
3.5 KiB
GraphQL

scalar Time
scalar UUID
type TaskLabel {
taskLabelID: ID!
labelColorID: UUID!
colorHex: String!
}
type ProfileIcon {
url: String
initials: String
}
type ProjectMember {
userID: ID!
firstName: String!
lastName: String!
profileIcon: ProfileIcon!
}
type RefreshToken {
tokenId: ID!
userId: UUID!
expiresAt: Time!
createdAt: Time!
}
type UserAccount {
userID: ID!
email: String!
createdAt: Time!
firstName: String!
lastName: String!
username: String!
profileIcon: ProfileIcon!
}
type Team {
teamID: ID!
createdAt: Time!
name: String!
}
type Project {
projectID: ID!
createdAt: Time!
name: String!
team: Team!
owner: ProjectMember!
taskGroups: [TaskGroup!]!
members: [ProjectMember!]!
}
type TaskGroup {
taskGroupID: ID!
projectID: String!
createdAt: Time!
name: String!
position: Float!
tasks: [Task!]!
}
type Task {
taskID: ID!
taskGroup: TaskGroup!
createdAt: Time!
name: String!
position: Float!
description: String
assigned: [ProjectMember!]!
labels: [TaskLabel!]!
}
input ProjectsFilter {
teamID: String
}
input FindUser {
userId: String!
}
input FindProject {
projectId: String!
}
input FindTask {
taskID: UUID!
}
type Query {
users: [UserAccount!]!
findUser(input: FindUser!): UserAccount!
findProject(input: FindProject!): Project!
findTask(input: FindTask!): Task!
projects(input: ProjectsFilter): [Project!]!
taskGroups: [TaskGroup!]!
me: UserAccount!
}
input NewRefreshToken {
userId: String!
}
input NewUserAccount {
username: String!
email: String!
firstName: String!
lastName: String!
password: String!
}
input NewTeam {
name: String!
organizationID: String!
}
input NewProject {
userID: UUID!
teamID: UUID!
name: String!
}
input NewTaskGroup {
projectID: String!
name: String!
position: Float!
}
input LogoutUser {
userID: String!
}
input NewTask {
taskGroupID: String!
name: String!
position: Float!
}
input NewTaskLocation {
taskID: String!
taskGroupID: String!
position: Float!
}
input DeleteTaskInput {
taskID: String!
}
type DeleteTaskPayload {
taskID: String!
}
input UpdateTaskName {
taskID: String!
name: String!
}
input NewTaskGroupLocation {
taskGroupID: UUID!
position: Float!
}
input DeleteTaskGroupInput {
taskGroupID: UUID!
}
type DeleteTaskGroupPayload {
ok: Boolean!
affectedRows: Int!
taskGroup: TaskGroup!
}
input AssignTaskInput {
taskID: UUID!
userID: UUID!
}
input UpdateTaskDescriptionInput {
taskID: UUID!
description: String!
}
input AddTaskLabelInput {
taskID: UUID!
labelColorID: UUID!
}
input RemoveTaskLabelInput {
taskID: UUID!
taskLabelID: UUID!
}
type Mutation {
createRefreshToken(input: NewRefreshToken!): RefreshToken!
createUserAccount(input: NewUserAccount!): UserAccount!
createTeam(input: NewTeam!): Team!
createProject(input: NewProject!): Project!
createTaskGroup(input: NewTaskGroup!): TaskGroup!
updateTaskGroupLocation(input: NewTaskGroupLocation!): TaskGroup!
deleteTaskGroup(input: DeleteTaskGroupInput!): DeleteTaskGroupPayload!
addTaskLabel(input: AddTaskLabelInput): Task!
removeTaskLabel(input: RemoveTaskLabelInput): Task!
createTask(input: NewTask!): Task!
updateTaskDescription(input: UpdateTaskDescriptionInput!): Task!
updateTaskLocation(input: NewTaskLocation!): Task!
updateTaskName(input: UpdateTaskName!): Task!
deleteTask(input: DeleteTaskInput!): DeleteTaskPayload!
assignTask(input: AssignTaskInput): Task!
logoutUser(input: LogoutUser!): Boolean!
}