arch: move web folder into api & move api to top level

This commit is contained in:
Jordan Knott
2020-07-04 18:08:37 -05:00
parent eaffaa70df
commit e5d5e6da01
354 changed files with 20 additions and 1557 deletions

View File

@ -0,0 +1,9 @@
mutation assignTask($taskID: UUID!, $userID: UUID!) {
assignTask(input: {taskID: $taskID, userID: $userID}) {
id
assigned {
id
fullName
}
}
}

View File

@ -0,0 +1,11 @@
mutation clearProfileAvatar {
clearProfileAvatar {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}

View File

@ -0,0 +1,10 @@
mutation createProject($teamID: UUID!, $userID: UUID!, $name: String!) {
createProject(input: {teamID: $teamID, userID: $userID, name: $name}) {
id
name
team {
id
name
}
}
}

View File

@ -0,0 +1,13 @@
mutation createProjectLabel($projectID: UUID!, $labelColorID: UUID!, $name: String!) {
createProjectLabel(input:{projectID:$projectID, labelColorID: $labelColorID, name: $name}) {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}

View File

@ -0,0 +1,9 @@
mutation createTaskGroup( $projectID: String!, $name: String!, $position: Float! ) {
createTaskGroup(
input: { projectID: $projectID, name: $name, position: $position }
) {
id
name
position
}
}

View File

@ -0,0 +1,5 @@
mutation deleteProjectLabel($projectLabelID: UUID!) {
deleteProjectLabel(input: { projectLabelID:$projectLabelID }) {
id
}
}

View File

@ -0,0 +1,5 @@
mutation deleteTask($taskID: String!) {
deleteTask(input: { taskID: $taskID }) {
taskID
}
}

View File

@ -0,0 +1,13 @@
mutation deleteTaskGroup($taskGroupID: UUID!) {
deleteTaskGroup(input: { taskGroupID: $taskGroupID }) {
ok
affectedRows
taskGroup {
id
tasks {
id
name
}
}
}
}

View File

@ -0,0 +1,65 @@
import gql from 'graphql-tag';
import TASK_FRAGMENT from './fragments/task';
const FIND_PROJECT_QUERY = gql`
query findProject($projectId: String!) {
findProject(input: { projectId: $projectId }) {
name
members {
id
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
labels {
id
createdDate
name
labelColor {
id
name
colorHex
position
}
}
taskGroups {
id
name
position
tasks {
...TaskFields
}
}
}
labelColors {
id
position
colorHex
name
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
${TASK_FRAGMENT}
}
`;

View File

@ -0,0 +1,55 @@
query findTask($taskID: UUID!) {
findTask(input: {taskID: $taskID}) {
id
name
description
dueDate
position
complete
taskGroup {
id
}
badges {
checklist {
total
complete
}
}
checklists {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
labels {
id
assignedDate
projectLabel {
id
name
createdDate
labelColor {
id
colorHex
position
name
}
}
}
assigned {
id
fullName
profileIcon {
url
initials
bgColor
}
}
}
}

View File

@ -0,0 +1,49 @@
import gql from 'graphql-tag';
const TASK_FRAGMENT = gql`
fragment TaskFields on Task {
id
name
description
dueDate
complete
position
badges {
checklist {
complete
total
}
}
taskGroup {
id
name
position
}
labels {
id
assignedDate
projectLabel {
id
name
createdDate
labelColor {
id
colorHex
position
name
}
}
}
assigned {
id
fullName
profileIcon {
url
initials
bgColor
}
}
}
`;
export default TASK_FRAGMENT;

View File

@ -0,0 +1,19 @@
query getProjects {
organizations {
id
name
}
teams {
id
name
createdAt
}
projects {
id
name
team {
id
name
}
}
}

View File

@ -0,0 +1,11 @@
query me {
me {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}

View File

@ -0,0 +1,25 @@
import gql from 'graphql-tag';
export const CREATE_PROJECT_MEMBER_MUTATION = gql`
mutation createProjectMember($projectID: UUID!, $userID: UUID!) {
createProjectMember(input: { projectID: $projectID, userID: $userID }) {
ok
member {
id
fullName
profileIcon {
url
initials
bgColor
}
username
role {
code
name
}
}
}
}
`;
export default CREATE_PROJECT_MEMBER_MUTATION;

View File

@ -0,0 +1,14 @@
import gql from 'graphql-tag';
export const DELETE_PROJECT_MUTATION = gql`
mutation deleteProject($projectID: UUID!) {
deleteProject(input: { projectID: $projectID }) {
ok
project {
id
}
}
}
`;
export default DELETE_PROJECT_MUTATION;

View File

@ -0,0 +1,15 @@
import gql from 'graphql-tag';
export const DELETE_PROJECT_MEMBER_MUTATION = gql`
mutation deleteProjectMember($projectID: UUID!, $userID: UUID!) {
deleteProjectMember(input: { projectID: $projectID, userID: $userID }) {
ok
member {
id
}
projectID
}
}
`;
export default DELETE_PROJECT_MEMBER_MUTATION;

View File

@ -0,0 +1,25 @@
import gql from 'graphql-tag';
export const SET_PROJECT_OWNER_MUTATION = gql`
mutation setProjectOwner($projectID: UUID!, $ownerID: UUID!) {
setProjectOwner(input: { projectID: $projectID, ownerID: $ownerID }) {
ok
newOwner {
id
role {
code
name
}
}
prevOwner {
id
role {
code
name
}
}
}
}
`;
export default SET_PROJECT_OWNER_MUTATION;

View File

@ -0,0 +1,18 @@
import gql from 'graphql-tag';
export const UPDATE_PROJECT_MEMBER_ROLE_MUTATION = gql`
mutation updateProjectMemberRole($projectID: UUID!, $userID: UUID!, $roleCode: RoleCode!) {
updateProjectMemberRole(input: { projectID: $projectID, userID: $userID, roleCode: $roleCode }) {
ok
member {
id
role {
code
name
}
}
}
}
`;
export default UPDATE_PROJECT_MEMBER_ROLE_MUTATION;

View File

@ -0,0 +1,13 @@
import gql from 'graphql-tag';
import TASK_FRAGMENT from '../fragments/task';
const CREATE_TASK_MUTATION = gql`
mutation createTask($taskGroupID: String!, $name: String!, $position: Float!) {
createTask(input: { taskGroupID: $taskGroupID, name: $name, position: $position }) {
...TaskFields
}
}
${TASK_FRAGMENT}
`;
export default CREATE_TASK_MUTATION;

View File

@ -0,0 +1,20 @@
import gql from 'graphql-tag';
const CREATE_TASK_CHECKLIST_MUTATION = gql`
mutation createTaskChecklist($taskID: UUID!, $name: String!, $position: Float!) {
createTaskChecklist(input: { taskID: $taskID, name: $name, position: $position }) {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
}
`;
export default CREATE_TASK_CHECKLIST_MUTATION;

View File

@ -0,0 +1,13 @@
import gql from 'graphql-tag';
const CREATE_TASK_CHECKLIST_ITEM = gql`
mutation createTaskChecklistItem($taskChecklistID: UUID!, $name: String!, $position: Float!) {
createTaskChecklistItem(input: { taskChecklistID: $taskChecklistID, name: $name, position: $position }) {
id
name
taskChecklistID
position
complete
}
}
`;

View File

@ -0,0 +1,14 @@
import gql from 'graphql-tag';
const DELETE_TASK_CHECKLIST_MUTATION = gql`
mutation deleteTaskChecklist($taskChecklistID: UUID!) {
deleteTaskChecklist(input: { taskChecklistID: $taskChecklistID }) {
ok
taskChecklist {
id
}
}
}
`;
export default DELETE_TASK_CHECKLIST_MUTATION;

View File

@ -0,0 +1,13 @@
import gql from 'graphql-tag';
const DELETE_TASK_CHECKLIST_ITEM = gql`
mutation deleteTaskChecklistItem($taskChecklistItemID: UUID!) {
deleteTaskChecklistItem(input: { taskChecklistItemID: $taskChecklistItemID }) {
ok
taskChecklistItem {
id
taskChecklistID
}
}
}
`;

View File

@ -0,0 +1,10 @@
import gql from 'graphql-tag';
const SET_TASK_CHECKLIST_ITEM_COMPLETE = gql`
mutation setTaskChecklistItemComplete($taskChecklistItemID: UUID!, $complete: Boolean!) {
setTaskChecklistItemComplete(input: { taskChecklistItemID: $taskChecklistItemID, complete: $complete }) {
id
complete
}
}
`;

View File

@ -0,0 +1,11 @@
import gql from 'graphql-tag';
import TASK_FRAGMENT from '../fragments/task';
const UPDATE_TASK_GROUP_NAME_MUTATION = gql`
mutation setTaskComplete($taskID: UUID!, $complete: Boolean!) {
setTaskComplete(input: { taskID: $taskID, complete: $complete }) {
...TaskFields
}
${TASK_FRAGMENT}
}
`;

View File

@ -0,0 +1,10 @@
import gql from 'graphql-tag';
const UPDATE_TASK_CHECKLIST_ITEM_NAME = gql`
mutation updateTaskChecklistItemName($taskChecklistItemID: UUID!, $name: String!) {
updateTaskChecklistItemName(input: { taskChecklistItemID: $taskChecklistItemID, name: $name }) {
id
name
}
}
`;

View File

@ -0,0 +1,19 @@
import gql from 'graphql-tag';
const UPDATE_TASK_CHECKLIST_NAME_MUTATION = gql`
mutation updateTaskChecklistName($taskChecklistID: UUID!, $name: String!) {
updateTaskChecklistName(input: { taskChecklistID: $taskChecklistID, name: $name }) {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
}
`;
export default UPDATE_TASK_CHECKLIST_NAME_MUTATION;

View File

@ -0,0 +1,12 @@
import gql from 'graphql-tag';
import TASK_FRAGMENT from '../fragments/task';
const UPDATE_TASK_GROUP_NAME_MUTATION = gql`
mutation updateTaskGroupName($taskGroupID: UUID!, $name: String!) {
updateTaskGroupName(input:{taskGroupID:$taskGroupID, name:$name}) {
id
name
}
${TASK_FRAGMENT}
}
`;

View File

@ -0,0 +1,13 @@
import gql from 'graphql-tag';
export const CREATE_TEAM_MUTATION = gql`
mutation createTeam($name: String!, $organizationID: UUID!) {
createTeam(input: { name: $name, organizationID: $organizationID }) {
id
createdAt
name
}
}
`;
export default CREATE_TEAM_MUTATION;

View File

@ -0,0 +1,27 @@
import gql from 'graphql-tag';
export const CREATE_TEAM_MEMBER_MUTATION = gql`
mutation createTeamMember($userID: UUID!, $teamID: UUID!) {
createTeamMember(input: { userID: $userID, teamID: $teamID }) {
team {
id
}
teamMember {
id
username
fullName
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
}
}
`;
export default CREATE_TEAM_MEMBER_MUTATION;

View File

@ -0,0 +1,14 @@
import gql from 'graphql-tag';
export const DELETE_TEAM_MUTATION = gql`
mutation deleteTeam($teamID: UUID!) {
deleteTeam(input: { teamID: $teamID }) {
ok
team {
id
}
}
}
`;
export default DELETE_TEAM_MUTATION;

View File

@ -0,0 +1,12 @@
import gql from 'graphql-tag';
export const DELETE_TEAM_MEMBER_MUTATION = gql`
mutation deleteTeamMember($teamID: UUID!, $userID: UUID!) {
deleteTeamMember(input: { teamID: $teamID, userID: $userID }) {
teamID
userID
}
}
`;
export default DELETE_TEAM_MEMBER_MUTATION;

View File

@ -0,0 +1,50 @@
import gql from 'graphql-tag';
export const GET_TEAM_QUERY = gql`
query getTeam($teamID: UUID!) {
findTeam(input: { teamID: $teamID }) {
id
createdAt
name
members {
id
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
}
projects(input: { teamID: $teamID }) {
id
name
team {
id
name
}
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
}
`;
export default GET_TEAM_QUERY;

View File

@ -0,0 +1,29 @@
mutation toggleTaskLabel($taskID: UUID!, $projectLabelID: UUID!) {
toggleTaskLabel(
input: {
taskID: $taskID,
projectLabelID: $projectLabelID
}
) {
active
task {
id
labels {
id
assignedDate
projectLabel {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}
}
}
}

View File

@ -0,0 +1,9 @@
mutation unassignTask($taskID: UUID!, $userID: UUID!) {
unassignTask(input: {taskID: $taskID, userID: $userID}) {
assigned {
id
fullName
}
id
}
}

View File

@ -0,0 +1,13 @@
mutation updateProjectLabel($projectLabelID: UUID!, $labelColorID: UUID!, $name: String!) {
updateProjectLabel(input:{projectLabelID:$projectLabelID, labelColorID: $labelColorID, name: $name}) {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}

View File

@ -0,0 +1,6 @@
mutation updateProjectName($projectID: UUID!, $name: String!) {
updateProjectName(input: {projectID: $projectID, name: $name}) {
id
name
}
}

View File

@ -0,0 +1,6 @@
mutation updateTaskDescription($taskID: UUID!, $description: String!) {
updateTaskDescription(input: {taskID: $taskID, description: $description}) {
id
description
}
}

View File

@ -0,0 +1,12 @@
mutation updateTaskDueDate($taskID: UUID!, $dueDate: Time) {
updateTaskDueDate (
input: {
taskID: $taskID
dueDate: $dueDate
}
) {
id
dueDate
}
}

View File

@ -0,0 +1,6 @@
mutation updateTaskGroupLocation($taskGroupID: UUID!, $position: Float!) {
updateTaskGroupLocation(input:{taskGroupID:$taskGroupID, position: $position}) {
id
position
}
}

View File

@ -0,0 +1,14 @@
mutation updateTaskLocation($taskID: UUID!, $taskGroupID: UUID!, $position: Float!) {
updateTaskLocation(input: { taskID: $taskID, taskGroupID: $taskGroupID, position: $position }) {
previousTaskGroupID
task {
id
createdAt
name
position
taskGroup {
id
}
}
}
}

View File

@ -0,0 +1,7 @@
mutation updateTaskName($taskID: String!, $name: String!) {
updateTaskName(input: { taskID: $taskID, name: $name }) {
id
name
position
}
}

View File

@ -0,0 +1,40 @@
import gql from 'graphql-tag';
export const CREATE_USER_MUTATION = gql`
mutation createUserAccount(
$username: String!
$roleCode: String!
$email: String!
$fullName: String!
$initials: String!
$password: String!
) {
createUserAccount(
input: {
roleCode: $roleCode
username: $username
email: $email
fullName: $fullName
initials: $initials
password: $password
}
) {
id
email
fullName
initials
username
profileIcon {
url
initials
bgColor
}
role {
code
name
}
}
}
`;
export default CREATE_USER_MUTATION;

View File

@ -0,0 +1,14 @@
import gql from 'graphql-tag';
export const DELETE_USER_MUTATION = gql`
mutation deleteUserAccount($userID: UUID!) {
deleteUserAccount(input: { userID: $userID }) {
ok
userAccount {
id
}
}
}
`;
export default DELETE_USER_MUTATION;

View File

@ -0,0 +1,18 @@
query users {
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
}