cleanup: merge types & add graphql-codegen-cli
This commit is contained in:
		@@ -12,6 +12,9 @@ func AuthenticationMiddleware(next http.Handler) http.Handler {
 | 
				
			|||||||
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 | 
						return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
		bearerTokenRaw := r.Header.Get("Authorization")
 | 
							bearerTokenRaw := r.Header.Get("Authorization")
 | 
				
			||||||
		splitToken := strings.Split(bearerTokenRaw, "Bearer")
 | 
							splitToken := strings.Split(bearerTokenRaw, "Bearer")
 | 
				
			||||||
 | 
							log.WithFields(log.Fields{
 | 
				
			||||||
 | 
								"bearerToken": bearerTokenRaw,
 | 
				
			||||||
 | 
							}).Warning("loading bearer token")
 | 
				
			||||||
		if len(splitToken) != 2 {
 | 
							if len(splitToken) != 2 {
 | 
				
			||||||
			w.WriteHeader(http.StatusBadRequest)
 | 
								w.WriteHeader(http.StatusBadRequest)
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@ func NewRouter(db *sqlx.DB) (chi.Router, error) {
 | 
				
			|||||||
	formatter.FullTimestamp = true
 | 
						formatter.FullTimestamp = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	routerLogger := log.New()
 | 
						routerLogger := log.New()
 | 
				
			||||||
	routerLogger.SetLevel(log.WarnLevel)
 | 
						routerLogger.SetLevel(log.DebugLevel)
 | 
				
			||||||
	routerLogger.Formatter = formatter
 | 
						routerLogger.Formatter = formatter
 | 
				
			||||||
	r := chi.NewRouter()
 | 
						r := chi.NewRouter()
 | 
				
			||||||
	cors := cors.New(cors.Options{
 | 
						cors := cors.New(cors.Options{
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								web/codegen.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								web/codegen.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					overwrite: true
 | 
				
			||||||
 | 
					schema:
 | 
				
			||||||
 | 
					  - '../api/graph/schema.graphqls'
 | 
				
			||||||
 | 
					documents: 'src/shared/graphql/*.graphqls'
 | 
				
			||||||
 | 
					generates:
 | 
				
			||||||
 | 
					  src/shared/generated/graphql.tsx:
 | 
				
			||||||
 | 
					    plugins:
 | 
				
			||||||
 | 
					      - 'typescript'
 | 
				
			||||||
 | 
					      - 'typescript-operations'
 | 
				
			||||||
 | 
					      - 'typescript-react-apollo'
 | 
				
			||||||
 | 
					    config:
 | 
				
			||||||
 | 
					      withHOC: false
 | 
				
			||||||
 | 
					      withComponent: false
 | 
				
			||||||
 | 
					      withHooks: true
 | 
				
			||||||
 | 
					      scalars:
 | 
				
			||||||
 | 
					        UUID: string
 | 
				
			||||||
@@ -35,7 +35,7 @@
 | 
				
			|||||||
    "apollo-link-state": "^0.4.2",
 | 
					    "apollo-link-state": "^0.4.2",
 | 
				
			||||||
    "apollo-utilities": "^1.3.3",
 | 
					    "apollo-utilities": "^1.3.3",
 | 
				
			||||||
    "color": "^3.1.2",
 | 
					    "color": "^3.1.2",
 | 
				
			||||||
    "graphql": "^14.6.0",
 | 
					    "graphql": "^15.0.0",
 | 
				
			||||||
    "graphql-tag": "^2.10.3",
 | 
					    "graphql-tag": "^2.10.3",
 | 
				
			||||||
    "history": "^4.10.1",
 | 
					    "history": "^4.10.1",
 | 
				
			||||||
    "lodash": "^4.17.15",
 | 
					    "lodash": "^4.17.15",
 | 
				
			||||||
@@ -57,7 +57,8 @@
 | 
				
			|||||||
    "test": "react-scripts test",
 | 
					    "test": "react-scripts test",
 | 
				
			||||||
    "eject": "react-scripts eject",
 | 
					    "eject": "react-scripts eject",
 | 
				
			||||||
    "storybook": "start-storybook -p 9009 -s public",
 | 
					    "storybook": "start-storybook -p 9009 -s public",
 | 
				
			||||||
    "build-storybook": "build-storybook -s public"
 | 
					    "build-storybook": "build-storybook -s public",
 | 
				
			||||||
 | 
					    "generate": "graphql-codegen"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "eslintConfig": {
 | 
					  "eslintConfig": {
 | 
				
			||||||
    "extends": "react-app"
 | 
					    "extends": "react-app"
 | 
				
			||||||
@@ -75,6 +76,10 @@
 | 
				
			|||||||
    ]
 | 
					    ]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
 | 
					    "@graphql-codegen/cli": "^1.13.2",
 | 
				
			||||||
 | 
					    "@graphql-codegen/typescript": "^1.13.2",
 | 
				
			||||||
 | 
					    "@graphql-codegen/typescript-operations": "^1.13.2",
 | 
				
			||||||
 | 
					    "@graphql-codegen/typescript-react-apollo": "^1.13.2",
 | 
				
			||||||
    "@storybook/addon-actions": "^5.3.13",
 | 
					    "@storybook/addon-actions": "^5.3.13",
 | 
				
			||||||
    "@storybook/addon-links": "^5.3.13",
 | 
					    "@storybook/addon-links": "^5.3.13",
 | 
				
			||||||
    "@storybook/addons": "^5.3.13",
 | 
					    "@storybook/addons": "^5.3.13",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,13 @@ import styled from 'styled-components/macro';
 | 
				
			|||||||
import { useQuery, useMutation } from '@apollo/react-hooks';
 | 
					import { useQuery, useMutation } from '@apollo/react-hooks';
 | 
				
			||||||
import gql from 'graphql-tag';
 | 
					import gql from 'graphql-tag';
 | 
				
			||||||
import { useParams } from 'react-router-dom';
 | 
					import { useParams } from 'react-router-dom';
 | 
				
			||||||
 | 
					import {
 | 
				
			||||||
 | 
					  useFindProjectQuery,
 | 
				
			||||||
 | 
					  useUpdateTaskNameMutation,
 | 
				
			||||||
 | 
					  useCreateTaskMutation,
 | 
				
			||||||
 | 
					  useDeleteTaskMutation,
 | 
				
			||||||
 | 
					  useUpdateTaskLocationMutation,
 | 
				
			||||||
 | 
					} from 'shared/generated/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import Navbar from 'App/Navbar';
 | 
					import Navbar from 'App/Navbar';
 | 
				
			||||||
import TopNavbar from 'App/TopNavbar';
 | 
					import TopNavbar from 'App/TopNavbar';
 | 
				
			||||||
@@ -14,7 +21,7 @@ interface ColumnState {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface TaskState {
 | 
					interface TaskState {
 | 
				
			||||||
  [key: string]: RemoteTask;
 | 
					  [key: string]: Task;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface State {
 | 
					interface State {
 | 
				
			||||||
@@ -26,7 +33,7 @@ interface QuickCardEditorState {
 | 
				
			|||||||
  isOpen: boolean;
 | 
					  isOpen: boolean;
 | 
				
			||||||
  left: number;
 | 
					  left: number;
 | 
				
			||||||
  top: number;
 | 
					  top: number;
 | 
				
			||||||
  task?: RemoteTask;
 | 
					  task?: Task;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const MainContent = styled.div`
 | 
					const MainContent = styled.div`
 | 
				
			||||||
@@ -46,113 +53,10 @@ const Title = styled.span`
 | 
				
			|||||||
  color: #fff;
 | 
					  color: #fff;
 | 
				
			||||||
`;
 | 
					`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface ProjectData {
 | 
					 | 
				
			||||||
  findProject: Project;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface UpdateTaskLocationData {
 | 
					 | 
				
			||||||
  updateTaskLocation: Task;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface UpdateTaskLocationVars {
 | 
					 | 
				
			||||||
  taskID: string;
 | 
					 | 
				
			||||||
  taskGroupID: string;
 | 
					 | 
				
			||||||
  position: number;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface ProjectVars {
 | 
					 | 
				
			||||||
  projectId: string;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface CreateTaskVars {
 | 
					 | 
				
			||||||
  taskGroupID: string;
 | 
					 | 
				
			||||||
  name: string;
 | 
					 | 
				
			||||||
  position: number;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface CreateTaskData {
 | 
					 | 
				
			||||||
  createTask: RemoteTask;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface ProjectParams {
 | 
					interface ProjectParams {
 | 
				
			||||||
  projectId: string;
 | 
					  projectId: string;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface DeleteTaskData {
 | 
					 | 
				
			||||||
  deleteTask: { taskID: string };
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface DeleteTaskVars {
 | 
					 | 
				
			||||||
  taskID: string;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface UpdateTaskNameData {
 | 
					 | 
				
			||||||
  updateTaskName: RemoteTask;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface UpdateTaskNameVars {
 | 
					 | 
				
			||||||
  taskID: string;
 | 
					 | 
				
			||||||
  name: string;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const UPDATE_TASK_NAME = gql`
 | 
					 | 
				
			||||||
  mutation updateTaskName($taskID: String!, $name: String!) {
 | 
					 | 
				
			||||||
    updateTaskName(input: { taskID: $taskID, name: $name }) {
 | 
					 | 
				
			||||||
      taskID
 | 
					 | 
				
			||||||
      name
 | 
					 | 
				
			||||||
      position
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
`;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const GET_PROJECT = gql`
 | 
					 | 
				
			||||||
  query getProject($projectId: String!) {
 | 
					 | 
				
			||||||
    findProject(input: { projectId: $projectId }) {
 | 
					 | 
				
			||||||
      name
 | 
					 | 
				
			||||||
      taskGroups {
 | 
					 | 
				
			||||||
        taskGroupID
 | 
					 | 
				
			||||||
        name
 | 
					 | 
				
			||||||
        position
 | 
					 | 
				
			||||||
        tasks {
 | 
					 | 
				
			||||||
          taskID
 | 
					 | 
				
			||||||
          name
 | 
					 | 
				
			||||||
          position
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
`;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const CREATE_TASK = gql`
 | 
					 | 
				
			||||||
  mutation createTask($taskGroupID: String!, $name: String!, $position: Float!) {
 | 
					 | 
				
			||||||
    createTask(input: { taskGroupID: $taskGroupID, name: $name, position: $position }) {
 | 
					 | 
				
			||||||
      taskID
 | 
					 | 
				
			||||||
      taskGroupID
 | 
					 | 
				
			||||||
      name
 | 
					 | 
				
			||||||
      position
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
`;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const DELETE_TASK = gql`
 | 
					 | 
				
			||||||
  mutation deleteTask($taskID: String!) {
 | 
					 | 
				
			||||||
    deleteTask(input: { taskID: $taskID }) {
 | 
					 | 
				
			||||||
      taskID
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
`;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const UPDATE_TASK_LOCATION = gql`
 | 
					 | 
				
			||||||
  mutation updateTaskLocation($taskID: String!, $taskGroupID: String!, $position: Float!) {
 | 
					 | 
				
			||||||
    updateTaskLocation(input: { taskID: $taskID, taskGroupID: $taskGroupID, position: $position }) {
 | 
					 | 
				
			||||||
      taskID
 | 
					 | 
				
			||||||
      createdAt
 | 
					 | 
				
			||||||
      name
 | 
					 | 
				
			||||||
      position
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
`;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const initialState: State = { tasks: {}, columns: {} };
 | 
					const initialState: State = { tasks: {}, columns: {} };
 | 
				
			||||||
const initialQuickCardEditorState: QuickCardEditorState = { isOpen: false, top: 0, left: 0 };
 | 
					const initialQuickCardEditorState: QuickCardEditorState = { isOpen: false, top: 0, left: 0 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -160,10 +64,8 @@ const Project = () => {
 | 
				
			|||||||
  const { projectId } = useParams<ProjectParams>();
 | 
					  const { projectId } = useParams<ProjectParams>();
 | 
				
			||||||
  const [listsData, setListsData] = useState(initialState);
 | 
					  const [listsData, setListsData] = useState(initialState);
 | 
				
			||||||
  const [quickCardEditor, setQuickCardEditor] = useState(initialQuickCardEditorState);
 | 
					  const [quickCardEditor, setQuickCardEditor] = useState(initialQuickCardEditorState);
 | 
				
			||||||
  const [updateTaskLocation, updateTaskLocationData] = useMutation<UpdateTaskLocationData, UpdateTaskLocationVars>(
 | 
					  const [updateTaskLocation] = useUpdateTaskLocationMutation();
 | 
				
			||||||
    UPDATE_TASK_LOCATION,
 | 
					  const [createTask] = useCreateTaskMutation({
 | 
				
			||||||
  );
 | 
					 | 
				
			||||||
  const [createTask, createTaskData] = useMutation<CreateTaskData, CreateTaskVars>(CREATE_TASK, {
 | 
					 | 
				
			||||||
    onCompleted: newTaskData => {
 | 
					    onCompleted: newTaskData => {
 | 
				
			||||||
      const newListsData = {
 | 
					      const newListsData = {
 | 
				
			||||||
        ...listsData,
 | 
					        ...listsData,
 | 
				
			||||||
@@ -181,7 +83,7 @@ const Project = () => {
 | 
				
			|||||||
      setListsData(newListsData);
 | 
					      setListsData(newListsData);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  const [deleteTask, deleteTaskData] = useMutation<DeleteTaskData, DeleteTaskVars>(DELETE_TASK, {
 | 
					  const [deleteTask] = useDeleteTaskMutation({
 | 
				
			||||||
    onCompleted: deletedTask => {
 | 
					    onCompleted: deletedTask => {
 | 
				
			||||||
      const { [deletedTask.deleteTask.taskID]: removedTask, ...remainingTasks } = listsData.tasks;
 | 
					      const { [deletedTask.deleteTask.taskID]: removedTask, ...remainingTasks } = listsData.tasks;
 | 
				
			||||||
      const newListsData = {
 | 
					      const newListsData = {
 | 
				
			||||||
@@ -191,7 +93,7 @@ const Project = () => {
 | 
				
			|||||||
      setListsData(newListsData);
 | 
					      setListsData(newListsData);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  const [updateTaskName, updateTaskNameData] = useMutation<UpdateTaskNameData, UpdateTaskNameVars>(UPDATE_TASK_NAME, {
 | 
					  const [updateTaskName] = useUpdateTaskNameMutation({
 | 
				
			||||||
    onCompleted: newTaskData => {
 | 
					    onCompleted: newTaskData => {
 | 
				
			||||||
      const newListsData = {
 | 
					      const newListsData = {
 | 
				
			||||||
        ...listsData,
 | 
					        ...listsData,
 | 
				
			||||||
@@ -206,7 +108,7 @@ const Project = () => {
 | 
				
			|||||||
      setListsData(newListsData);
 | 
					      setListsData(newListsData);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  const { loading, data } = useQuery<ProjectData, ProjectVars>(GET_PROJECT, {
 | 
					  const { loading, data } = useFindProjectQuery({
 | 
				
			||||||
    variables: { projectId },
 | 
					    variables: { projectId },
 | 
				
			||||||
    onCompleted: newData => {
 | 
					    onCompleted: newData => {
 | 
				
			||||||
      let newListsData: State = { tasks: {}, columns: {} };
 | 
					      let newListsData: State = { tasks: {}, columns: {} };
 | 
				
			||||||
@@ -217,7 +119,7 @@ const Project = () => {
 | 
				
			|||||||
          position: taskGroup.position,
 | 
					          position: taskGroup.position,
 | 
				
			||||||
          tasks: [],
 | 
					          tasks: [],
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        taskGroup.tasks.forEach((task: RemoteTask) => {
 | 
					        taskGroup.tasks.forEach((task: Task) => {
 | 
				
			||||||
          newListsData.tasks[task.taskID] = {
 | 
					          newListsData.tasks[task.taskID] = {
 | 
				
			||||||
            taskID: task.taskID,
 | 
					            taskID: task.taskID,
 | 
				
			||||||
            taskGroupID: taskGroup.taskGroupID,
 | 
					            taskGroupID: taskGroup.taskGroupID,
 | 
				
			||||||
@@ -254,9 +156,7 @@ const Project = () => {
 | 
				
			|||||||
    setListsData(newState);
 | 
					    setListsData(newState);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  const onCardCreate = (taskGroupID: string, name: string) => {
 | 
					  const onCardCreate = (taskGroupID: string, name: string) => {
 | 
				
			||||||
    const taskGroupTasks = Object.values(listsData.tasks).filter(
 | 
					    const taskGroupTasks = Object.values(listsData.tasks).filter((task: Task) => task.taskGroupID === taskGroupID);
 | 
				
			||||||
      (task: RemoteTask) => task.taskGroupID === taskGroupID,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
    var position = 65535;
 | 
					    var position = 65535;
 | 
				
			||||||
    console.log(taskGroupID);
 | 
					    console.log(taskGroupID);
 | 
				
			||||||
    console.log(taskGroupTasks);
 | 
					    console.log(taskGroupTasks);
 | 
				
			||||||
@@ -269,12 +169,12 @@ const Project = () => {
 | 
				
			|||||||
    createTask({ variables: { taskGroupID: taskGroupID, name: name, position: position } });
 | 
					    createTask({ variables: { taskGroupID: taskGroupID, name: name, position: position } });
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  const onQuickEditorOpen = (e: ContextMenuEvent) => {
 | 
					  const onQuickEditorOpen = (e: ContextMenuEvent) => {
 | 
				
			||||||
    const task = Object.values(listsData.tasks).find(task => task.taskID === e.cardId);
 | 
					    const currentTask = Object.values(listsData.tasks).find(task => task.taskID === e.taskID);
 | 
				
			||||||
    setQuickCardEditor({
 | 
					    setQuickCardEditor({
 | 
				
			||||||
      top: e.top,
 | 
					      top: e.top,
 | 
				
			||||||
      left: e.left,
 | 
					      left: e.left,
 | 
				
			||||||
      isOpen: true,
 | 
					      isOpen: true,
 | 
				
			||||||
      task,
 | 
					      task: currentTask,
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -299,8 +199,8 @@ const Project = () => {
 | 
				
			|||||||
        {quickCardEditor.isOpen && (
 | 
					        {quickCardEditor.isOpen && (
 | 
				
			||||||
          <QuickCardEditor
 | 
					          <QuickCardEditor
 | 
				
			||||||
            isOpen={true}
 | 
					            isOpen={true}
 | 
				
			||||||
            listId={quickCardEditor.task ? quickCardEditor.task.taskGroupID : ''}
 | 
					            taskID={quickCardEditor.task ? quickCardEditor.task.taskID : ''}
 | 
				
			||||||
            cardId={quickCardEditor.task ? quickCardEditor.task.taskID : ''}
 | 
					            taskGroupID={quickCardEditor.task ? quickCardEditor.task.taskGroupID : ''}
 | 
				
			||||||
            cardTitle={quickCardEditor.task ? quickCardEditor.task.name : ''}
 | 
					            cardTitle={quickCardEditor.task ? quickCardEditor.task.name : ''}
 | 
				
			||||||
            onCloseEditor={() => setQuickCardEditor(initialQuickCardEditorState)}
 | 
					            onCloseEditor={() => setQuickCardEditor(initialQuickCardEditorState)}
 | 
				
			||||||
            onEditCard={(listId: string, cardId: string, cardName: string) =>
 | 
					            onEditCard={(listId: string, cardId: string, cardName: string) =>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,6 @@
 | 
				
			|||||||
import React, { useState } from 'react';
 | 
					import React, { useState } from 'react';
 | 
				
			||||||
import styled from 'styled-components/macro';
 | 
					import styled from 'styled-components/macro';
 | 
				
			||||||
import { useQuery } from '@apollo/react-hooks';
 | 
					import { useGetProjectsQuery } from 'shared/generated/graphql';
 | 
				
			||||||
import gql from 'graphql-tag';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import TopNavbar from 'App/TopNavbar';
 | 
					import TopNavbar from 'App/TopNavbar';
 | 
				
			||||||
import ProjectGridItem from 'shared/components/ProjectGridItem';
 | 
					import ProjectGridItem from 'shared/components/ProjectGridItem';
 | 
				
			||||||
@@ -25,29 +24,8 @@ const Wrapper = styled.div`
 | 
				
			|||||||
  font-size: 16px;
 | 
					  font-size: 16px;
 | 
				
			||||||
  background-color: red;
 | 
					  background-color: red;
 | 
				
			||||||
`;
 | 
					`;
 | 
				
			||||||
 | 
					 | 
				
			||||||
interface ProjectData {
 | 
					 | 
				
			||||||
  name: string;
 | 
					 | 
				
			||||||
  organizations: Organization[];
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const GET_PROJECTS = gql`
 | 
					 | 
				
			||||||
  query getProjects {
 | 
					 | 
				
			||||||
    organizations {
 | 
					 | 
				
			||||||
      name
 | 
					 | 
				
			||||||
      teams {
 | 
					 | 
				
			||||||
        name
 | 
					 | 
				
			||||||
        projects {
 | 
					 | 
				
			||||||
          name
 | 
					 | 
				
			||||||
          projectID
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
`;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const Projects = () => {
 | 
					const Projects = () => {
 | 
				
			||||||
  const { loading, data } = useQuery<ProjectData>(GET_PROJECTS);
 | 
					  const { loading, data } = useGetProjectsQuery();
 | 
				
			||||||
  console.log(loading, data);
 | 
					  console.log(loading, data);
 | 
				
			||||||
  if (loading) {
 | 
					  if (loading) {
 | 
				
			||||||
    return <Wrapper>Loading</Wrapper>;
 | 
					    return <Wrapper>Loading</Wrapper>;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										24
									
								
								web/src/citadel.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								web/src/citadel.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -1,23 +1,25 @@
 | 
				
			|||||||
type ContextMenuEvent = {
 | 
					type ContextMenuEvent = {
 | 
				
			||||||
  left: number;
 | 
					  left: number;
 | 
				
			||||||
  top: number;
 | 
					  top: number;
 | 
				
			||||||
  cardId: string;
 | 
					  taskID: string;
 | 
				
			||||||
  listId: string;
 | 
					  taskGroupID: string;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface RemoteTask {
 | 
					type Task = {
 | 
				
			||||||
  taskID: string;
 | 
					  taskID: string;
 | 
				
			||||||
  taskGroupID: string;
 | 
					  taskGroupID: string;
 | 
				
			||||||
  name: string;
 | 
					  name: string;
 | 
				
			||||||
  position: number;
 | 
					  position: number;
 | 
				
			||||||
  labels: Label[];
 | 
					  labels: Label[];
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type TaskGroup = {
 | 
					type TaskGroup = {
 | 
				
			||||||
  taskGroupID: string;
 | 
					  taskGroupID: string;
 | 
				
			||||||
  name: string;
 | 
					  name: string;
 | 
				
			||||||
  position: number;
 | 
					  position: number;
 | 
				
			||||||
  tasks: RemoteTask[];
 | 
					  tasks: RemoteTask[];
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Project = {
 | 
					type Project = {
 | 
				
			||||||
  projectID: string;
 | 
					  projectID: string;
 | 
				
			||||||
  name: string;
 | 
					  name: string;
 | 
				
			||||||
@@ -26,15 +28,16 @@ type Project = {
 | 
				
			|||||||
  taskGroups: TaskGroup[];
 | 
					  taskGroups: TaskGroup[];
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface Organization {
 | 
					type Organization = {
 | 
				
			||||||
  name: string;
 | 
					  name: string;
 | 
				
			||||||
  teams: Team[];
 | 
					  teams: Team[];
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface Team {
 | 
					type Team = {
 | 
				
			||||||
  name: string;
 | 
					  name: string;
 | 
				
			||||||
  projects: Project[];
 | 
					  projects: Project[];
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Label = {
 | 
					type Label = {
 | 
				
			||||||
  labelId: string;
 | 
					  labelId: string;
 | 
				
			||||||
  name: string;
 | 
					  name: string;
 | 
				
			||||||
@@ -42,11 +45,6 @@ type Label = {
 | 
				
			|||||||
  active: boolean;
 | 
					  active: boolean;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Task = {
 | 
					 | 
				
			||||||
  title: string;
 | 
					 | 
				
			||||||
  position: number;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
type RefreshTokenResponse = {
 | 
					type RefreshTokenResponse = {
 | 
				
			||||||
  accessToken: string;
 | 
					  accessToken: string;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,8 +33,8 @@ export const Default = () => {
 | 
				
			|||||||
  const $ref = useRef<HTMLDivElement>(null);
 | 
					  const $ref = useRef<HTMLDivElement>(null);
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Card
 | 
					    <Card
 | 
				
			||||||
      cardId="1"
 | 
					      taskID="1"
 | 
				
			||||||
      listId="1"
 | 
					      taskGroupID="1"
 | 
				
			||||||
      description=""
 | 
					      description=""
 | 
				
			||||||
      ref={$ref}
 | 
					      ref={$ref}
 | 
				
			||||||
      title="Hello, world"
 | 
					      title="Hello, world"
 | 
				
			||||||
@@ -48,8 +48,8 @@ export const Labels = () => {
 | 
				
			|||||||
  const $ref = useRef<HTMLDivElement>(null);
 | 
					  const $ref = useRef<HTMLDivElement>(null);
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Card
 | 
					    <Card
 | 
				
			||||||
      cardId="1"
 | 
					      taskID="1"
 | 
				
			||||||
      listId="1"
 | 
					      taskGroupID="1"
 | 
				
			||||||
      description=""
 | 
					      description=""
 | 
				
			||||||
      ref={$ref}
 | 
					      ref={$ref}
 | 
				
			||||||
      title="Hello, world"
 | 
					      title="Hello, world"
 | 
				
			||||||
@@ -64,8 +64,8 @@ export const Badges = () => {
 | 
				
			|||||||
  const $ref = useRef<HTMLDivElement>(null);
 | 
					  const $ref = useRef<HTMLDivElement>(null);
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Card
 | 
					    <Card
 | 
				
			||||||
      cardId="1"
 | 
					      taskID="1"
 | 
				
			||||||
      listId="1"
 | 
					      taskGroupID="1"
 | 
				
			||||||
      description="hello!"
 | 
					      description="hello!"
 | 
				
			||||||
      ref={$ref}
 | 
					      ref={$ref}
 | 
				
			||||||
      title="Hello, world"
 | 
					      title="Hello, world"
 | 
				
			||||||
@@ -82,8 +82,8 @@ export const PastDue = () => {
 | 
				
			|||||||
  const $ref = useRef<HTMLDivElement>(null);
 | 
					  const $ref = useRef<HTMLDivElement>(null);
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Card
 | 
					    <Card
 | 
				
			||||||
      cardId="1"
 | 
					      taskID="1"
 | 
				
			||||||
      listId="1"
 | 
					      taskGroupID="1"
 | 
				
			||||||
      description="hello!"
 | 
					      description="hello!"
 | 
				
			||||||
      ref={$ref}
 | 
					      ref={$ref}
 | 
				
			||||||
      title="Hello, world"
 | 
					      title="Hello, world"
 | 
				
			||||||
@@ -100,8 +100,8 @@ export const Everything = () => {
 | 
				
			|||||||
  const $ref = useRef<HTMLDivElement>(null);
 | 
					  const $ref = useRef<HTMLDivElement>(null);
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Card
 | 
					    <Card
 | 
				
			||||||
      cardId="1"
 | 
					      taskID="1"
 | 
				
			||||||
      listId="1"
 | 
					      taskGroupID="1"
 | 
				
			||||||
      description="hello!"
 | 
					      description="hello!"
 | 
				
			||||||
      ref={$ref}
 | 
					      ref={$ref}
 | 
				
			||||||
      title="Hello, world"
 | 
					      title="Hello, world"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,8 +33,8 @@ type Checklist = {
 | 
				
			|||||||
type Props = {
 | 
					type Props = {
 | 
				
			||||||
  title: string;
 | 
					  title: string;
 | 
				
			||||||
  description: string;
 | 
					  description: string;
 | 
				
			||||||
  cardId: string;
 | 
					  taskID: string;
 | 
				
			||||||
  listId: string;
 | 
					  taskGroupID: string;
 | 
				
			||||||
  onContextMenu: (e: ContextMenuEvent) => void;
 | 
					  onContextMenu: (e: ContextMenuEvent) => void;
 | 
				
			||||||
  onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
 | 
					  onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
 | 
				
			||||||
  dueDate?: DueDate;
 | 
					  dueDate?: DueDate;
 | 
				
			||||||
@@ -49,8 +49,8 @@ const Card = React.forwardRef(
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      wrapperProps,
 | 
					      wrapperProps,
 | 
				
			||||||
      onContextMenu,
 | 
					      onContextMenu,
 | 
				
			||||||
      cardId,
 | 
					      taskID,
 | 
				
			||||||
      listId,
 | 
					      taskGroupID,
 | 
				
			||||||
      onClick,
 | 
					      onClick,
 | 
				
			||||||
      labels,
 | 
					      labels,
 | 
				
			||||||
      title,
 | 
					      title,
 | 
				
			||||||
@@ -69,8 +69,8 @@ const Card = React.forwardRef(
 | 
				
			|||||||
        onContextMenu({
 | 
					        onContextMenu({
 | 
				
			||||||
          top: pos.top,
 | 
					          top: pos.top,
 | 
				
			||||||
          left: pos.left,
 | 
					          left: pos.left,
 | 
				
			||||||
          listId,
 | 
					          taskGroupID,
 | 
				
			||||||
          cardId,
 | 
					          taskID,
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,8 +35,8 @@ const createCard = () => {
 | 
				
			|||||||
  const $ref = createRef<HTMLDivElement>();
 | 
					  const $ref = createRef<HTMLDivElement>();
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Card
 | 
					    <Card
 | 
				
			||||||
      cardId="1"
 | 
					      taskID="1"
 | 
				
			||||||
      listId="1"
 | 
					      taskGroupID="1"
 | 
				
			||||||
      description="hello!"
 | 
					      description="hello!"
 | 
				
			||||||
      ref={$ref}
 | 
					      ref={$ref}
 | 
				
			||||||
      title="Hello, world"
 | 
					      title="Hello, world"
 | 
				
			||||||
@@ -113,8 +113,8 @@ export const WithCard = () => {
 | 
				
			|||||||
    >
 | 
					    >
 | 
				
			||||||
      <ListCards>
 | 
					      <ListCards>
 | 
				
			||||||
        <Card
 | 
					        <Card
 | 
				
			||||||
          cardId="1"
 | 
					          taskID="1"
 | 
				
			||||||
          listId="1"
 | 
					          taskGroupID="1"
 | 
				
			||||||
          description="hello!"
 | 
					          description="hello!"
 | 
				
			||||||
          ref={$cardRef}
 | 
					          ref={$cardRef}
 | 
				
			||||||
          title="Hello, world"
 | 
					          title="Hello, world"
 | 
				
			||||||
@@ -151,8 +151,8 @@ export const WithCardAndComposer = () => {
 | 
				
			|||||||
    >
 | 
					    >
 | 
				
			||||||
      <ListCards>
 | 
					      <ListCards>
 | 
				
			||||||
        <Card
 | 
					        <Card
 | 
				
			||||||
          cardId="1"
 | 
					          taskID="1"
 | 
				
			||||||
          listId="1"
 | 
					          taskGroupID="1"
 | 
				
			||||||
          description="hello!"
 | 
					          description="hello!"
 | 
				
			||||||
          ref={$cardRef}
 | 
					          ref={$cardRef}
 | 
				
			||||||
          title="Hello, world"
 | 
					          title="Hello, world"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,7 +53,7 @@ interface Columns {
 | 
				
			|||||||
  [key: string]: TaskGroup;
 | 
					  [key: string]: TaskGroup;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
interface Tasks {
 | 
					interface Tasks {
 | 
				
			||||||
  [key: string]: RemoteTask;
 | 
					  [key: string]: Task;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Props = {
 | 
					type Props = {
 | 
				
			||||||
@@ -139,7 +139,7 @@ const Lists = ({ columns, tasks, onCardDrop, onListDrop, onCardCreate, onQuickEd
 | 
				
			|||||||
                      <Droppable type="tasks" droppableId={column.taskGroupID}>
 | 
					                      <Droppable type="tasks" droppableId={column.taskGroupID}>
 | 
				
			||||||
                        {columnDropProvided => (
 | 
					                        {columnDropProvided => (
 | 
				
			||||||
                          <ListCards ref={columnDropProvided.innerRef} {...columnDropProvided.droppableProps}>
 | 
					                          <ListCards ref={columnDropProvided.innerRef} {...columnDropProvided.droppableProps}>
 | 
				
			||||||
                            {columnCards.map((task: RemoteTask, taskIndex: any) => {
 | 
					                            {columnCards.map((task: Task, taskIndex: any) => {
 | 
				
			||||||
                              return (
 | 
					                              return (
 | 
				
			||||||
                                <Draggable key={task.taskID} draggableId={task.taskID} index={taskIndex}>
 | 
					                                <Draggable key={task.taskID} draggableId={task.taskID} index={taskIndex}>
 | 
				
			||||||
                                  {taskProvided => {
 | 
					                                  {taskProvided => {
 | 
				
			||||||
@@ -150,8 +150,8 @@ const Lists = ({ columns, tasks, onCardDrop, onListDrop, onCardCreate, onQuickEd
 | 
				
			|||||||
                                          ...taskProvided.dragHandleProps,
 | 
					                                          ...taskProvided.dragHandleProps,
 | 
				
			||||||
                                        }}
 | 
					                                        }}
 | 
				
			||||||
                                        ref={taskProvided.innerRef}
 | 
					                                        ref={taskProvided.innerRef}
 | 
				
			||||||
                                        cardId={task.taskID}
 | 
					                                        taskID={task.taskID}
 | 
				
			||||||
                                        listId={column.taskGroupID}
 | 
					                                        taskGroupID={column.taskGroupID}
 | 
				
			||||||
                                        description=""
 | 
					                                        description=""
 | 
				
			||||||
                                        title={task.name}
 | 
					                                        title={task.name}
 | 
				
			||||||
                                        labels={task.labels}
 | 
					                                        labels={task.labels}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,8 +42,8 @@ export const Default = () => {
 | 
				
			|||||||
      {isEditorOpen && (
 | 
					      {isEditorOpen && (
 | 
				
			||||||
        <QuickCardEditor
 | 
					        <QuickCardEditor
 | 
				
			||||||
          isOpen={isEditorOpen}
 | 
					          isOpen={isEditorOpen}
 | 
				
			||||||
          listId="1"
 | 
					          taskGroupID="1"
 | 
				
			||||||
          cardId="1"
 | 
					          taskID="1"
 | 
				
			||||||
          cardTitle="Hello, world"
 | 
					          cardTitle="Hello, world"
 | 
				
			||||||
          onCloseEditor={() => setEditorOpen(false)}
 | 
					          onCloseEditor={() => setEditorOpen(false)}
 | 
				
			||||||
          onEditCard={action('edit card')}
 | 
					          onEditCard={action('edit card')}
 | 
				
			||||||
@@ -64,8 +64,8 @@ export const Default = () => {
 | 
				
			|||||||
      >
 | 
					      >
 | 
				
			||||||
        <ListCards>
 | 
					        <ListCards>
 | 
				
			||||||
          <Card
 | 
					          <Card
 | 
				
			||||||
            cardId="1"
 | 
					            taskID="1"
 | 
				
			||||||
            listId="1"
 | 
					            taskGroupID="1"
 | 
				
			||||||
            description="hello!"
 | 
					            description="hello!"
 | 
				
			||||||
            ref={$cardRef}
 | 
					            ref={$cardRef}
 | 
				
			||||||
            title="Hello, world"
 | 
					            title="Hello, world"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,13 +15,13 @@ import {
 | 
				
			|||||||
} from './Styles';
 | 
					} from './Styles';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Props = {
 | 
					type Props = {
 | 
				
			||||||
  listId: string;
 | 
					  taskID: string;
 | 
				
			||||||
  cardId: string;
 | 
					  taskGroupID: string;
 | 
				
			||||||
  cardTitle: string;
 | 
					  cardTitle: string;
 | 
				
			||||||
  onCloseEditor: () => void;
 | 
					  onCloseEditor: () => void;
 | 
				
			||||||
  onEditCard: (listId: string, cardId: string, cardName: string) => void;
 | 
					  onEditCard: (taskGroupID: string, taskID: string, cardName: string) => void;
 | 
				
			||||||
  onOpenPopup: (popupType: number, top: number, left: number) => void;
 | 
					  onOpenPopup: (popupType: number, top: number, left: number) => void;
 | 
				
			||||||
  onArchiveCard: (listId: string, cardId: string) => void;
 | 
					  onArchiveCard: (taskGroupID: string, taskID: string) => void;
 | 
				
			||||||
  labels?: Label[];
 | 
					  labels?: Label[];
 | 
				
			||||||
  isOpen: boolean;
 | 
					  isOpen: boolean;
 | 
				
			||||||
  top: number;
 | 
					  top: number;
 | 
				
			||||||
@@ -29,8 +29,8 @@ type Props = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const QuickCardEditor = ({
 | 
					const QuickCardEditor = ({
 | 
				
			||||||
  listId,
 | 
					  taskGroupID,
 | 
				
			||||||
  cardId,
 | 
					  taskID,
 | 
				
			||||||
  cardTitle,
 | 
					  cardTitle,
 | 
				
			||||||
  onCloseEditor,
 | 
					  onCloseEditor,
 | 
				
			||||||
  onOpenPopup,
 | 
					  onOpenPopup,
 | 
				
			||||||
@@ -57,7 +57,7 @@ const QuickCardEditor = ({
 | 
				
			|||||||
  const handleKeyDown = (e: any) => {
 | 
					  const handleKeyDown = (e: any) => {
 | 
				
			||||||
    if (e.key === 'Enter') {
 | 
					    if (e.key === 'Enter') {
 | 
				
			||||||
      e.preventDefault();
 | 
					      e.preventDefault();
 | 
				
			||||||
      onEditCard(listId, cardId, currentCardTitle);
 | 
					      onEditCard(taskGroupID, taskID, currentCardTitle);
 | 
				
			||||||
      onCloseEditor();
 | 
					      onCloseEditor();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
@@ -89,7 +89,7 @@ const QuickCardEditor = ({
 | 
				
			|||||||
            />
 | 
					            />
 | 
				
			||||||
          </EditorDetails>
 | 
					          </EditorDetails>
 | 
				
			||||||
        </Editor>
 | 
					        </Editor>
 | 
				
			||||||
        <SaveButton onClick={e => onEditCard(listId, cardId, currentCardTitle)}>Save</SaveButton>
 | 
					        <SaveButton onClick={e => onEditCard(taskGroupID, taskID, currentCardTitle)}>Save</SaveButton>
 | 
				
			||||||
        <EditorButtons>
 | 
					        <EditorButtons>
 | 
				
			||||||
          <EditorButton
 | 
					          <EditorButton
 | 
				
			||||||
            ref={$labelsRef}
 | 
					            ref={$labelsRef}
 | 
				
			||||||
@@ -104,7 +104,7 @@ const QuickCardEditor = ({
 | 
				
			|||||||
          <EditorButton
 | 
					          <EditorButton
 | 
				
			||||||
            onClick={e => {
 | 
					            onClick={e => {
 | 
				
			||||||
              e.stopPropagation();
 | 
					              e.stopPropagation();
 | 
				
			||||||
              onArchiveCard(listId, cardId);
 | 
					              onArchiveCard(taskGroupID, taskID);
 | 
				
			||||||
              onCloseEditor();
 | 
					              onCloseEditor();
 | 
				
			||||||
            }}
 | 
					            }}
 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										568
									
								
								web/src/shared/generated/graphql.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										568
									
								
								web/src/shared/generated/graphql.tsx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,568 @@
 | 
				
			|||||||
 | 
					import gql from 'graphql-tag';
 | 
				
			||||||
 | 
					import * as ApolloReactCommon from '@apollo/react-common';
 | 
				
			||||||
 | 
					import * as ApolloReactHooks from '@apollo/react-hooks';
 | 
				
			||||||
 | 
					export type Maybe<T> = T | null;
 | 
				
			||||||
 | 
					/** All built-in and custom scalars, mapped to their actual values */
 | 
				
			||||||
 | 
					export type Scalars = {
 | 
				
			||||||
 | 
					  ID: string;
 | 
				
			||||||
 | 
					  String: string;
 | 
				
			||||||
 | 
					  Boolean: boolean;
 | 
				
			||||||
 | 
					  Int: number;
 | 
				
			||||||
 | 
					  Float: number;
 | 
				
			||||||
 | 
					  Time: any;
 | 
				
			||||||
 | 
					  UUID: string;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type RefreshToken = {
 | 
				
			||||||
 | 
					   __typename?: 'RefreshToken';
 | 
				
			||||||
 | 
					  tokenId: Scalars['ID'];
 | 
				
			||||||
 | 
					  userId: Scalars['UUID'];
 | 
				
			||||||
 | 
					  expiresAt: Scalars['Time'];
 | 
				
			||||||
 | 
					  createdAt: Scalars['Time'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type UserAccount = {
 | 
				
			||||||
 | 
					   __typename?: 'UserAccount';
 | 
				
			||||||
 | 
					  userID: Scalars['ID'];
 | 
				
			||||||
 | 
					  email: Scalars['String'];
 | 
				
			||||||
 | 
					  createdAt: Scalars['Time'];
 | 
				
			||||||
 | 
					  displayName: Scalars['String'];
 | 
				
			||||||
 | 
					  username: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type Organization = {
 | 
				
			||||||
 | 
					   __typename?: 'Organization';
 | 
				
			||||||
 | 
					  organizationID: Scalars['ID'];
 | 
				
			||||||
 | 
					  createdAt: Scalars['Time'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  teams: Array<Team>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type Team = {
 | 
				
			||||||
 | 
					   __typename?: 'Team';
 | 
				
			||||||
 | 
					  teamID: Scalars['ID'];
 | 
				
			||||||
 | 
					  createdAt: Scalars['Time'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  projects: Array<Project>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type Project = {
 | 
				
			||||||
 | 
					   __typename?: 'Project';
 | 
				
			||||||
 | 
					  projectID: Scalars['ID'];
 | 
				
			||||||
 | 
					  teamID: Scalars['String'];
 | 
				
			||||||
 | 
					  createdAt: Scalars['Time'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  taskGroups: Array<TaskGroup>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type TaskGroup = {
 | 
				
			||||||
 | 
					   __typename?: 'TaskGroup';
 | 
				
			||||||
 | 
					  taskGroupID: Scalars['ID'];
 | 
				
			||||||
 | 
					  projectID: Scalars['String'];
 | 
				
			||||||
 | 
					  createdAt: Scalars['Time'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  position: Scalars['Float'];
 | 
				
			||||||
 | 
					  tasks: Array<Task>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type Task = {
 | 
				
			||||||
 | 
					   __typename?: 'Task';
 | 
				
			||||||
 | 
					  taskID: Scalars['ID'];
 | 
				
			||||||
 | 
					  taskGroupID: Scalars['String'];
 | 
				
			||||||
 | 
					  createdAt: Scalars['Time'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  position: Scalars['Float'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type ProjectsFilter = {
 | 
				
			||||||
 | 
					  teamID?: Maybe<Scalars['String']>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type FindUser = {
 | 
				
			||||||
 | 
					  userId: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type FindProject = {
 | 
				
			||||||
 | 
					  projectId: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type Query = {
 | 
				
			||||||
 | 
					   __typename?: 'Query';
 | 
				
			||||||
 | 
					  organizations: Array<Organization>;
 | 
				
			||||||
 | 
					  users: Array<UserAccount>;
 | 
				
			||||||
 | 
					  findUser: UserAccount;
 | 
				
			||||||
 | 
					  findProject: Project;
 | 
				
			||||||
 | 
					  teams: Array<Team>;
 | 
				
			||||||
 | 
					  projects: Array<Project>;
 | 
				
			||||||
 | 
					  taskGroups: Array<TaskGroup>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type QueryFindUserArgs = {
 | 
				
			||||||
 | 
					  input: FindUser;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type QueryFindProjectArgs = {
 | 
				
			||||||
 | 
					  input: FindProject;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type QueryProjectsArgs = {
 | 
				
			||||||
 | 
					  input?: Maybe<ProjectsFilter>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewRefreshToken = {
 | 
				
			||||||
 | 
					  userId: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewUserAccount = {
 | 
				
			||||||
 | 
					  username: Scalars['String'];
 | 
				
			||||||
 | 
					  email: Scalars['String'];
 | 
				
			||||||
 | 
					  displayName: Scalars['String'];
 | 
				
			||||||
 | 
					  password: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewTeam = {
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  organizationID: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewProject = {
 | 
				
			||||||
 | 
					  teamID: Scalars['String'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewTaskGroup = {
 | 
				
			||||||
 | 
					  projectID: Scalars['String'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  position: Scalars['Float'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewOrganization = {
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type LogoutUser = {
 | 
				
			||||||
 | 
					  userID: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewTask = {
 | 
				
			||||||
 | 
					  taskGroupID: Scalars['String'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  position: Scalars['Float'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type NewTaskLocation = {
 | 
				
			||||||
 | 
					  taskID: Scalars['String'];
 | 
				
			||||||
 | 
					  taskGroupID: Scalars['String'];
 | 
				
			||||||
 | 
					  position: Scalars['Float'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type DeleteTaskInput = {
 | 
				
			||||||
 | 
					  taskID: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type DeleteTaskPayload = {
 | 
				
			||||||
 | 
					   __typename?: 'DeleteTaskPayload';
 | 
				
			||||||
 | 
					  taskID: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type UpdateTaskName = {
 | 
				
			||||||
 | 
					  taskID: Scalars['String'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type Mutation = {
 | 
				
			||||||
 | 
					   __typename?: 'Mutation';
 | 
				
			||||||
 | 
					  createRefreshToken: RefreshToken;
 | 
				
			||||||
 | 
					  createUserAccount: UserAccount;
 | 
				
			||||||
 | 
					  createOrganization: Organization;
 | 
				
			||||||
 | 
					  createTeam: Team;
 | 
				
			||||||
 | 
					  createProject: Project;
 | 
				
			||||||
 | 
					  createTaskGroup: TaskGroup;
 | 
				
			||||||
 | 
					  createTask: Task;
 | 
				
			||||||
 | 
					  updateTaskLocation: Task;
 | 
				
			||||||
 | 
					  logoutUser: Scalars['Boolean'];
 | 
				
			||||||
 | 
					  updateTaskName: Task;
 | 
				
			||||||
 | 
					  deleteTask: DeleteTaskPayload;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationCreateRefreshTokenArgs = {
 | 
				
			||||||
 | 
					  input: NewRefreshToken;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationCreateUserAccountArgs = {
 | 
				
			||||||
 | 
					  input: NewUserAccount;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationCreateOrganizationArgs = {
 | 
				
			||||||
 | 
					  input: NewOrganization;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationCreateTeamArgs = {
 | 
				
			||||||
 | 
					  input: NewTeam;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationCreateProjectArgs = {
 | 
				
			||||||
 | 
					  input: NewProject;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationCreateTaskGroupArgs = {
 | 
				
			||||||
 | 
					  input: NewTaskGroup;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationCreateTaskArgs = {
 | 
				
			||||||
 | 
					  input: NewTask;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationUpdateTaskLocationArgs = {
 | 
				
			||||||
 | 
					  input: NewTaskLocation;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationLogoutUserArgs = {
 | 
				
			||||||
 | 
					  input: LogoutUser;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationUpdateTaskNameArgs = {
 | 
				
			||||||
 | 
					  input: UpdateTaskName;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type MutationDeleteTaskArgs = {
 | 
				
			||||||
 | 
					  input: DeleteTaskInput;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type CreateTaskMutationVariables = {
 | 
				
			||||||
 | 
					  taskGroupID: Scalars['String'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					  position: Scalars['Float'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type CreateTaskMutation = (
 | 
				
			||||||
 | 
					  { __typename?: 'Mutation' }
 | 
				
			||||||
 | 
					  & { createTask: (
 | 
				
			||||||
 | 
					    { __typename?: 'Task' }
 | 
				
			||||||
 | 
					    & Pick<Task, 'taskID' | 'taskGroupID' | 'name' | 'position'>
 | 
				
			||||||
 | 
					  ) }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type DeleteTaskMutationVariables = {
 | 
				
			||||||
 | 
					  taskID: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type DeleteTaskMutation = (
 | 
				
			||||||
 | 
					  { __typename?: 'Mutation' }
 | 
				
			||||||
 | 
					  & { deleteTask: (
 | 
				
			||||||
 | 
					    { __typename?: 'DeleteTaskPayload' }
 | 
				
			||||||
 | 
					    & Pick<DeleteTaskPayload, 'taskID'>
 | 
				
			||||||
 | 
					  ) }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type FindProjectQueryVariables = {
 | 
				
			||||||
 | 
					  projectId: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type FindProjectQuery = (
 | 
				
			||||||
 | 
					  { __typename?: 'Query' }
 | 
				
			||||||
 | 
					  & { findProject: (
 | 
				
			||||||
 | 
					    { __typename?: 'Project' }
 | 
				
			||||||
 | 
					    & Pick<Project, 'name'>
 | 
				
			||||||
 | 
					    & { taskGroups: Array<(
 | 
				
			||||||
 | 
					      { __typename?: 'TaskGroup' }
 | 
				
			||||||
 | 
					      & Pick<TaskGroup, 'taskGroupID' | 'name' | 'position'>
 | 
				
			||||||
 | 
					      & { tasks: Array<(
 | 
				
			||||||
 | 
					        { __typename?: 'Task' }
 | 
				
			||||||
 | 
					        & Pick<Task, 'taskID' | 'name' | 'position'>
 | 
				
			||||||
 | 
					      )> }
 | 
				
			||||||
 | 
					    )> }
 | 
				
			||||||
 | 
					  ) }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type GetProjectsQueryVariables = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type GetProjectsQuery = (
 | 
				
			||||||
 | 
					  { __typename?: 'Query' }
 | 
				
			||||||
 | 
					  & { organizations: Array<(
 | 
				
			||||||
 | 
					    { __typename?: 'Organization' }
 | 
				
			||||||
 | 
					    & Pick<Organization, 'name'>
 | 
				
			||||||
 | 
					    & { teams: Array<(
 | 
				
			||||||
 | 
					      { __typename?: 'Team' }
 | 
				
			||||||
 | 
					      & Pick<Team, 'name'>
 | 
				
			||||||
 | 
					      & { projects: Array<(
 | 
				
			||||||
 | 
					        { __typename?: 'Project' }
 | 
				
			||||||
 | 
					        & Pick<Project, 'name' | 'projectID'>
 | 
				
			||||||
 | 
					      )> }
 | 
				
			||||||
 | 
					    )> }
 | 
				
			||||||
 | 
					  )> }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type UpdateTaskLocationMutationVariables = {
 | 
				
			||||||
 | 
					  taskID: Scalars['String'];
 | 
				
			||||||
 | 
					  taskGroupID: Scalars['String'];
 | 
				
			||||||
 | 
					  position: Scalars['Float'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type UpdateTaskLocationMutation = (
 | 
				
			||||||
 | 
					  { __typename?: 'Mutation' }
 | 
				
			||||||
 | 
					  & { updateTaskLocation: (
 | 
				
			||||||
 | 
					    { __typename?: 'Task' }
 | 
				
			||||||
 | 
					    & Pick<Task, 'taskID' | 'createdAt' | 'name' | 'position'>
 | 
				
			||||||
 | 
					  ) }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type UpdateTaskNameMutationVariables = {
 | 
				
			||||||
 | 
					  taskID: Scalars['String'];
 | 
				
			||||||
 | 
					  name: Scalars['String'];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type UpdateTaskNameMutation = (
 | 
				
			||||||
 | 
					  { __typename?: 'Mutation' }
 | 
				
			||||||
 | 
					  & { updateTaskName: (
 | 
				
			||||||
 | 
					    { __typename?: 'Task' }
 | 
				
			||||||
 | 
					    & Pick<Task, 'taskID' | 'name' | 'position'>
 | 
				
			||||||
 | 
					  ) }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const CreateTaskDocument = gql`
 | 
				
			||||||
 | 
					    mutation createTask($taskGroupID: String!, $name: String!, $position: Float!) {
 | 
				
			||||||
 | 
					  createTask(input: {taskGroupID: $taskGroupID, name: $name, position: $position}) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					    taskGroupID
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    position
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					    `;
 | 
				
			||||||
 | 
					export type CreateTaskMutationFn = ApolloReactCommon.MutationFunction<CreateTaskMutation, CreateTaskMutationVariables>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * __useCreateTaskMutation__
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * To run a mutation, you first call `useCreateTaskMutation` within a React component and pass it any options that fit your needs.
 | 
				
			||||||
 | 
					 * When your component renders, `useCreateTaskMutation` returns a tuple that includes:
 | 
				
			||||||
 | 
					 * - A mutate function that you can call at any time to execute the mutation
 | 
				
			||||||
 | 
					 * - An object with fields that represent the current status of the mutation's execution
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @example
 | 
				
			||||||
 | 
					 * const [createTaskMutation, { data, loading, error }] = useCreateTaskMutation({
 | 
				
			||||||
 | 
					 *   variables: {
 | 
				
			||||||
 | 
					 *      taskGroupID: // value for 'taskGroupID'
 | 
				
			||||||
 | 
					 *      name: // value for 'name'
 | 
				
			||||||
 | 
					 *      position: // value for 'position'
 | 
				
			||||||
 | 
					 *   },
 | 
				
			||||||
 | 
					 * });
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function useCreateTaskMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<CreateTaskMutation, CreateTaskMutationVariables>) {
 | 
				
			||||||
 | 
					        return ApolloReactHooks.useMutation<CreateTaskMutation, CreateTaskMutationVariables>(CreateTaskDocument, baseOptions);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					export type CreateTaskMutationHookResult = ReturnType<typeof useCreateTaskMutation>;
 | 
				
			||||||
 | 
					export type CreateTaskMutationResult = ApolloReactCommon.MutationResult<CreateTaskMutation>;
 | 
				
			||||||
 | 
					export type CreateTaskMutationOptions = ApolloReactCommon.BaseMutationOptions<CreateTaskMutation, CreateTaskMutationVariables>;
 | 
				
			||||||
 | 
					export const DeleteTaskDocument = gql`
 | 
				
			||||||
 | 
					    mutation deleteTask($taskID: String!) {
 | 
				
			||||||
 | 
					  deleteTask(input: {taskID: $taskID}) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					    `;
 | 
				
			||||||
 | 
					export type DeleteTaskMutationFn = ApolloReactCommon.MutationFunction<DeleteTaskMutation, DeleteTaskMutationVariables>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * __useDeleteTaskMutation__
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * To run a mutation, you first call `useDeleteTaskMutation` within a React component and pass it any options that fit your needs.
 | 
				
			||||||
 | 
					 * When your component renders, `useDeleteTaskMutation` returns a tuple that includes:
 | 
				
			||||||
 | 
					 * - A mutate function that you can call at any time to execute the mutation
 | 
				
			||||||
 | 
					 * - An object with fields that represent the current status of the mutation's execution
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @example
 | 
				
			||||||
 | 
					 * const [deleteTaskMutation, { data, loading, error }] = useDeleteTaskMutation({
 | 
				
			||||||
 | 
					 *   variables: {
 | 
				
			||||||
 | 
					 *      taskID: // value for 'taskID'
 | 
				
			||||||
 | 
					 *   },
 | 
				
			||||||
 | 
					 * });
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function useDeleteTaskMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<DeleteTaskMutation, DeleteTaskMutationVariables>) {
 | 
				
			||||||
 | 
					        return ApolloReactHooks.useMutation<DeleteTaskMutation, DeleteTaskMutationVariables>(DeleteTaskDocument, baseOptions);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					export type DeleteTaskMutationHookResult = ReturnType<typeof useDeleteTaskMutation>;
 | 
				
			||||||
 | 
					export type DeleteTaskMutationResult = ApolloReactCommon.MutationResult<DeleteTaskMutation>;
 | 
				
			||||||
 | 
					export type DeleteTaskMutationOptions = ApolloReactCommon.BaseMutationOptions<DeleteTaskMutation, DeleteTaskMutationVariables>;
 | 
				
			||||||
 | 
					export const FindProjectDocument = gql`
 | 
				
			||||||
 | 
					    query findProject($projectId: String!) {
 | 
				
			||||||
 | 
					  findProject(input: {projectId: $projectId}) {
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    taskGroups {
 | 
				
			||||||
 | 
					      taskGroupID
 | 
				
			||||||
 | 
					      name
 | 
				
			||||||
 | 
					      position
 | 
				
			||||||
 | 
					      tasks {
 | 
				
			||||||
 | 
					        taskID
 | 
				
			||||||
 | 
					        name
 | 
				
			||||||
 | 
					        position
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					    `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * __useFindProjectQuery__
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * To run a query within a React component, call `useFindProjectQuery` and pass it any options that fit your needs.
 | 
				
			||||||
 | 
					 * When your component renders, `useFindProjectQuery` returns an object from Apollo Client that contains loading, error, and data properties
 | 
				
			||||||
 | 
					 * you can use to render your UI.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @example
 | 
				
			||||||
 | 
					 * const { data, loading, error } = useFindProjectQuery({
 | 
				
			||||||
 | 
					 *   variables: {
 | 
				
			||||||
 | 
					 *      projectId: // value for 'projectId'
 | 
				
			||||||
 | 
					 *   },
 | 
				
			||||||
 | 
					 * });
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function useFindProjectQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<FindProjectQuery, FindProjectQueryVariables>) {
 | 
				
			||||||
 | 
					        return ApolloReactHooks.useQuery<FindProjectQuery, FindProjectQueryVariables>(FindProjectDocument, baseOptions);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					export function useFindProjectLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<FindProjectQuery, FindProjectQueryVariables>) {
 | 
				
			||||||
 | 
					          return ApolloReactHooks.useLazyQuery<FindProjectQuery, FindProjectQueryVariables>(FindProjectDocument, baseOptions);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					export type FindProjectQueryHookResult = ReturnType<typeof useFindProjectQuery>;
 | 
				
			||||||
 | 
					export type FindProjectLazyQueryHookResult = ReturnType<typeof useFindProjectLazyQuery>;
 | 
				
			||||||
 | 
					export type FindProjectQueryResult = ApolloReactCommon.QueryResult<FindProjectQuery, FindProjectQueryVariables>;
 | 
				
			||||||
 | 
					export const GetProjectsDocument = gql`
 | 
				
			||||||
 | 
					    query getProjects {
 | 
				
			||||||
 | 
					  organizations {
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    teams {
 | 
				
			||||||
 | 
					      name
 | 
				
			||||||
 | 
					      projects {
 | 
				
			||||||
 | 
					        name
 | 
				
			||||||
 | 
					        projectID
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					    `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * __useGetProjectsQuery__
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * To run a query within a React component, call `useGetProjectsQuery` and pass it any options that fit your needs.
 | 
				
			||||||
 | 
					 * When your component renders, `useGetProjectsQuery` returns an object from Apollo Client that contains loading, error, and data properties
 | 
				
			||||||
 | 
					 * you can use to render your UI.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @example
 | 
				
			||||||
 | 
					 * const { data, loading, error } = useGetProjectsQuery({
 | 
				
			||||||
 | 
					 *   variables: {
 | 
				
			||||||
 | 
					 *   },
 | 
				
			||||||
 | 
					 * });
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function useGetProjectsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<GetProjectsQuery, GetProjectsQueryVariables>) {
 | 
				
			||||||
 | 
					        return ApolloReactHooks.useQuery<GetProjectsQuery, GetProjectsQueryVariables>(GetProjectsDocument, baseOptions);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					export function useGetProjectsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<GetProjectsQuery, GetProjectsQueryVariables>) {
 | 
				
			||||||
 | 
					          return ApolloReactHooks.useLazyQuery<GetProjectsQuery, GetProjectsQueryVariables>(GetProjectsDocument, baseOptions);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					export type GetProjectsQueryHookResult = ReturnType<typeof useGetProjectsQuery>;
 | 
				
			||||||
 | 
					export type GetProjectsLazyQueryHookResult = ReturnType<typeof useGetProjectsLazyQuery>;
 | 
				
			||||||
 | 
					export type GetProjectsQueryResult = ApolloReactCommon.QueryResult<GetProjectsQuery, GetProjectsQueryVariables>;
 | 
				
			||||||
 | 
					export const UpdateTaskLocationDocument = gql`
 | 
				
			||||||
 | 
					    mutation updateTaskLocation($taskID: String!, $taskGroupID: String!, $position: Float!) {
 | 
				
			||||||
 | 
					  updateTaskLocation(input: {taskID: $taskID, taskGroupID: $taskGroupID, position: $position}) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					    createdAt
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    position
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					    `;
 | 
				
			||||||
 | 
					export type UpdateTaskLocationMutationFn = ApolloReactCommon.MutationFunction<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * __useUpdateTaskLocationMutation__
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * To run a mutation, you first call `useUpdateTaskLocationMutation` within a React component and pass it any options that fit your needs.
 | 
				
			||||||
 | 
					 * When your component renders, `useUpdateTaskLocationMutation` returns a tuple that includes:
 | 
				
			||||||
 | 
					 * - A mutate function that you can call at any time to execute the mutation
 | 
				
			||||||
 | 
					 * - An object with fields that represent the current status of the mutation's execution
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @example
 | 
				
			||||||
 | 
					 * const [updateTaskLocationMutation, { data, loading, error }] = useUpdateTaskLocationMutation({
 | 
				
			||||||
 | 
					 *   variables: {
 | 
				
			||||||
 | 
					 *      taskID: // value for 'taskID'
 | 
				
			||||||
 | 
					 *      taskGroupID: // value for 'taskGroupID'
 | 
				
			||||||
 | 
					 *      position: // value for 'position'
 | 
				
			||||||
 | 
					 *   },
 | 
				
			||||||
 | 
					 * });
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function useUpdateTaskLocationMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>) {
 | 
				
			||||||
 | 
					        return ApolloReactHooks.useMutation<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>(UpdateTaskLocationDocument, baseOptions);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					export type UpdateTaskLocationMutationHookResult = ReturnType<typeof useUpdateTaskLocationMutation>;
 | 
				
			||||||
 | 
					export type UpdateTaskLocationMutationResult = ApolloReactCommon.MutationResult<UpdateTaskLocationMutation>;
 | 
				
			||||||
 | 
					export type UpdateTaskLocationMutationOptions = ApolloReactCommon.BaseMutationOptions<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>;
 | 
				
			||||||
 | 
					export const UpdateTaskNameDocument = gql`
 | 
				
			||||||
 | 
					    mutation updateTaskName($taskID: String!, $name: String!) {
 | 
				
			||||||
 | 
					  updateTaskName(input: {taskID: $taskID, name: $name}) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    position
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					    `;
 | 
				
			||||||
 | 
					export type UpdateTaskNameMutationFn = ApolloReactCommon.MutationFunction<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * __useUpdateTaskNameMutation__
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * To run a mutation, you first call `useUpdateTaskNameMutation` within a React component and pass it any options that fit your needs.
 | 
				
			||||||
 | 
					 * When your component renders, `useUpdateTaskNameMutation` returns a tuple that includes:
 | 
				
			||||||
 | 
					 * - A mutate function that you can call at any time to execute the mutation
 | 
				
			||||||
 | 
					 * - An object with fields that represent the current status of the mutation's execution
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @example
 | 
				
			||||||
 | 
					 * const [updateTaskNameMutation, { data, loading, error }] = useUpdateTaskNameMutation({
 | 
				
			||||||
 | 
					 *   variables: {
 | 
				
			||||||
 | 
					 *      taskID: // value for 'taskID'
 | 
				
			||||||
 | 
					 *      name: // value for 'name'
 | 
				
			||||||
 | 
					 *   },
 | 
				
			||||||
 | 
					 * });
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function useUpdateTaskNameMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>) {
 | 
				
			||||||
 | 
					        return ApolloReactHooks.useMutation<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>(UpdateTaskNameDocument, baseOptions);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					export type UpdateTaskNameMutationHookResult = ReturnType<typeof useUpdateTaskNameMutation>;
 | 
				
			||||||
 | 
					export type UpdateTaskNameMutationResult = ApolloReactCommon.MutationResult<UpdateTaskNameMutation>;
 | 
				
			||||||
 | 
					export type UpdateTaskNameMutationOptions = ApolloReactCommon.BaseMutationOptions<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>;
 | 
				
			||||||
							
								
								
									
										8
									
								
								web/src/shared/graphql/createTask.graphqls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								web/src/shared/graphql/createTask.graphqls
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					mutation createTask($taskGroupID: String!, $name: String!, $position: Float!) {
 | 
				
			||||||
 | 
					  createTask(input: { taskGroupID: $taskGroupID, name: $name, position: $position }) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					    taskGroupID
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    position
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										5
									
								
								web/src/shared/graphql/deleteTask.graphqls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								web/src/shared/graphql/deleteTask.graphqls
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					mutation deleteTask($taskID: String!) {
 | 
				
			||||||
 | 
					  deleteTask(input: { taskID: $taskID }) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										15
									
								
								web/src/shared/graphql/findProject.graphqls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								web/src/shared/graphql/findProject.graphqls
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					query findProject($projectId: String!) {
 | 
				
			||||||
 | 
					  findProject(input: { projectId: $projectId }) {
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    taskGroups {
 | 
				
			||||||
 | 
					      taskGroupID
 | 
				
			||||||
 | 
					      name
 | 
				
			||||||
 | 
					      position
 | 
				
			||||||
 | 
					      tasks {
 | 
				
			||||||
 | 
					        taskID
 | 
				
			||||||
 | 
					        name
 | 
				
			||||||
 | 
					        position
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										12
									
								
								web/src/shared/graphql/getProjects.graphqls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								web/src/shared/graphql/getProjects.graphqls
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					query getProjects {
 | 
				
			||||||
 | 
					  organizations {
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    teams {
 | 
				
			||||||
 | 
					      name
 | 
				
			||||||
 | 
					      projects {
 | 
				
			||||||
 | 
					        name
 | 
				
			||||||
 | 
					        projectID
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										8
									
								
								web/src/shared/graphql/updateTaskLocation.graphqls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								web/src/shared/graphql/updateTaskLocation.graphqls
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					mutation updateTaskLocation($taskID: String!, $taskGroupID: String!, $position: Float!) {
 | 
				
			||||||
 | 
					  updateTaskLocation(input: { taskID: $taskID, taskGroupID: $taskGroupID, position: $position }) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					    createdAt
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    position
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										7
									
								
								web/src/shared/graphql/updateTaskName.graphqls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								web/src/shared/graphql/updateTaskName.graphqls
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					mutation updateTaskName($taskID: String!, $name: String!) {
 | 
				
			||||||
 | 
					  updateTaskName(input: { taskID: $taskID, name: $name }) {
 | 
				
			||||||
 | 
					    taskID
 | 
				
			||||||
 | 
					    name
 | 
				
			||||||
 | 
					    position
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										1739
									
								
								web/yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										1739
									
								
								web/yarn.lock
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user