taskcafe/api/graph/schema.graphqls
2020-05-27 16:18:50 -05:00

248 lines
4.0 KiB
GraphQL

scalar Time
scalar UUID
type ProjectLabel {
id: ID!
createdDate: Time!
labelColor: LabelColor!
name: String
}
type LabelColor {
id: ID!
name: String!
position: Float!
colorHex: String!
}
type TaskLabel {
id: ID!
projectLabelID: UUID!
assignedDate: Time!
colorHex: String!
name: String
}
type ProfileIcon {
url: String
initials: String
bgColor: String
}
type ProjectMember {
id: ID!
firstName: String!
lastName: String!
profileIcon: ProfileIcon!
}
type RefreshToken {
id: ID!
userId: UUID!
expiresAt: Time!
createdAt: Time!
}
type UserAccount {
id: ID!
email: String!
createdAt: Time!
firstName: String!
lastName: String!
username: String!
profileIcon: ProfileIcon!
}
type Team {
id: ID!
createdAt: Time!
name: String!
}
type Project {
id: ID!
createdAt: Time!
name: String!
team: Team!
owner: ProjectMember!
taskGroups: [TaskGroup!]!
members: [ProjectMember!]!
labels: [ProjectLabel!]!
}
type TaskGroup {
id: ID!
projectID: String!
createdAt: Time!
name: String!
position: Float!
tasks: [Task!]!
}
type Task {
id: 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!]!
labelColors: [LabelColor!]!
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 UnassignTaskInput {
taskID: UUID!
userID: UUID!
}
input UpdateTaskDescriptionInput {
taskID: UUID!
description: String!
}
input AddTaskLabelInput {
taskID: UUID!
labelColorID: UUID!
}
input RemoveTaskLabelInput {
taskID: UUID!
taskLabelID: UUID!
}
input NewProjectLabel {
projectID: UUID!
labelColorID: UUID!
name: String
}
type Mutation {
createRefreshToken(input: NewRefreshToken!): RefreshToken!
createUserAccount(input: NewUserAccount!): UserAccount!
createTeam(input: NewTeam!): Team!
createProject(input: NewProject!): Project!
createProjectLabel(input: NewProjectLabel!): ProjectLabel!
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!
unassignTask(input: UnassignTaskInput): Task!
logoutUser(input: LogoutUser!): Boolean!
}