2020-04-10 05:27:57 +02:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type RefreshToken = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'RefreshToken';
|
2020-04-10 05:27:57 +02:00
|
|
|
tokenId: Scalars['ID'];
|
|
|
|
userId: Scalars['UUID'];
|
|
|
|
expiresAt: Scalars['Time'];
|
|
|
|
createdAt: Scalars['Time'];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type UserAccount = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'UserAccount';
|
2020-04-10 05:27:57 +02:00
|
|
|
userID: Scalars['ID'];
|
|
|
|
email: Scalars['String'];
|
|
|
|
createdAt: Scalars['Time'];
|
|
|
|
displayName: Scalars['String'];
|
|
|
|
username: Scalars['String'];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Organization = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'Organization';
|
2020-04-10 05:27:57 +02:00
|
|
|
organizationID: Scalars['ID'];
|
|
|
|
createdAt: Scalars['Time'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
teams: Array<Team>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Team = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'Team';
|
2020-04-10 05:27:57 +02:00
|
|
|
teamID: Scalars['ID'];
|
|
|
|
createdAt: Scalars['Time'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
projects: Array<Project>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Project = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'Project';
|
2020-04-10 05:27:57 +02:00
|
|
|
projectID: Scalars['ID'];
|
|
|
|
teamID: Scalars['String'];
|
|
|
|
createdAt: Scalars['Time'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
taskGroups: Array<TaskGroup>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TaskGroup = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'TaskGroup';
|
2020-04-10 05:27:57 +02:00
|
|
|
taskGroupID: Scalars['ID'];
|
|
|
|
projectID: Scalars['String'];
|
|
|
|
createdAt: Scalars['Time'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
position: Scalars['Float'];
|
|
|
|
tasks: Array<Task>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Task = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'Task';
|
2020-04-10 05:27:57 +02:00
|
|
|
taskID: Scalars['ID'];
|
2020-04-11 04:22:58 +02:00
|
|
|
taskGroup: TaskGroup;
|
2020-04-10 05:27:57 +02:00
|
|
|
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 = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'Query';
|
2020-04-10 05:27:57 +02:00
|
|
|
organizations: Array<Organization>;
|
|
|
|
users: Array<UserAccount>;
|
|
|
|
findUser: UserAccount;
|
|
|
|
findProject: Project;
|
|
|
|
teams: Array<Team>;
|
|
|
|
projects: Array<Project>;
|
|
|
|
taskGroups: Array<TaskGroup>;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type QueryFindUserArgs = {
|
|
|
|
input: FindUser;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type QueryFindProjectArgs = {
|
|
|
|
input: FindProject;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
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 = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'DeleteTaskPayload';
|
2020-04-10 05:27:57 +02:00
|
|
|
taskID: Scalars['String'];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type UpdateTaskName = {
|
|
|
|
taskID: Scalars['String'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Mutation = {
|
2020-04-11 04:22:58 +02:00
|
|
|
__typename?: 'Mutation';
|
2020-04-10 05:27:57 +02:00
|
|
|
createRefreshToken: RefreshToken;
|
|
|
|
createUserAccount: UserAccount;
|
|
|
|
createOrganization: Organization;
|
|
|
|
createTeam: Team;
|
|
|
|
createProject: Project;
|
|
|
|
createTaskGroup: TaskGroup;
|
|
|
|
createTask: Task;
|
|
|
|
updateTaskLocation: Task;
|
|
|
|
logoutUser: Scalars['Boolean'];
|
|
|
|
updateTaskName: Task;
|
|
|
|
deleteTask: DeleteTaskPayload;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationCreateRefreshTokenArgs = {
|
|
|
|
input: NewRefreshToken;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationCreateUserAccountArgs = {
|
|
|
|
input: NewUserAccount;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationCreateOrganizationArgs = {
|
|
|
|
input: NewOrganization;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationCreateTeamArgs = {
|
|
|
|
input: NewTeam;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationCreateProjectArgs = {
|
|
|
|
input: NewProject;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationCreateTaskGroupArgs = {
|
|
|
|
input: NewTaskGroup;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationCreateTaskArgs = {
|
|
|
|
input: NewTask;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationUpdateTaskLocationArgs = {
|
|
|
|
input: NewTaskLocation;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationLogoutUserArgs = {
|
|
|
|
input: LogoutUser;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationUpdateTaskNameArgs = {
|
|
|
|
input: UpdateTaskName;
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type MutationDeleteTaskArgs = {
|
|
|
|
input: DeleteTaskInput;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type CreateTaskMutationVariables = {
|
|
|
|
taskGroupID: Scalars['String'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
position: Scalars['Float'];
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
export type CreateTaskMutation = (
|
|
|
|
{ __typename?: 'Mutation' }
|
|
|
|
& { createTask: (
|
|
|
|
{ __typename?: 'Task' }
|
|
|
|
& Pick<Task, 'taskID' | 'name' | 'position'>
|
|
|
|
& { taskGroup: (
|
|
|
|
{ __typename?: 'TaskGroup' }
|
|
|
|
& Pick<TaskGroup, 'taskGroupID'>
|
|
|
|
) }
|
|
|
|
) }
|
|
|
|
);
|
|
|
|
|
|
|
|
export type CreateTaskGroupMutationVariables = {
|
|
|
|
projectID: Scalars['String'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
position: Scalars['Float'];
|
2020-04-10 21:47:24 +02:00
|
|
|
};
|
2020-04-10 05:27:57 +02:00
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
export type CreateTaskGroupMutation = (
|
|
|
|
{ __typename?: 'Mutation' }
|
|
|
|
& { createTaskGroup: (
|
|
|
|
{ __typename?: 'TaskGroup' }
|
|
|
|
& Pick<TaskGroup, 'taskGroupID' | 'name' | 'position'>
|
|
|
|
) }
|
|
|
|
);
|
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
export type DeleteTaskMutationVariables = {
|
|
|
|
taskID: Scalars['String'];
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
export type DeleteTaskMutation = (
|
|
|
|
{ __typename?: 'Mutation' }
|
|
|
|
& { deleteTask: (
|
|
|
|
{ __typename?: 'DeleteTaskPayload' }
|
|
|
|
& Pick<DeleteTaskPayload, 'taskID'>
|
|
|
|
) }
|
|
|
|
);
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
export type FindProjectQueryVariables = {
|
|
|
|
projectId: Scalars['String'];
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
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'>
|
|
|
|
)> }
|
|
|
|
)> }
|
|
|
|
) }
|
|
|
|
);
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
export type GetProjectsQueryVariables = {};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
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'>
|
|
|
|
)> }
|
|
|
|
)> }
|
|
|
|
)> }
|
|
|
|
);
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
export type UpdateTaskLocationMutationVariables = {
|
|
|
|
taskID: Scalars['String'];
|
|
|
|
taskGroupID: Scalars['String'];
|
|
|
|
position: Scalars['Float'];
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
export type UpdateTaskLocationMutation = (
|
|
|
|
{ __typename?: 'Mutation' }
|
|
|
|
& { updateTaskLocation: (
|
|
|
|
{ __typename?: 'Task' }
|
|
|
|
& Pick<Task, 'taskID' | 'createdAt' | 'name' | 'position'>
|
|
|
|
) }
|
|
|
|
);
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
export type UpdateTaskNameMutationVariables = {
|
|
|
|
taskID: Scalars['String'];
|
|
|
|
name: Scalars['String'];
|
|
|
|
};
|
|
|
|
|
2020-04-11 04:22:58 +02:00
|
|
|
|
|
|
|
export type UpdateTaskNameMutation = (
|
|
|
|
{ __typename?: 'Mutation' }
|
|
|
|
& { updateTaskName: (
|
|
|
|
{ __typename?: 'Task' }
|
|
|
|
& Pick<Task, 'taskID' | 'name' | 'position'>
|
|
|
|
) }
|
|
|
|
);
|
|
|
|
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
export const CreateTaskDocument = gql`
|
2020-04-11 04:22:58 +02:00
|
|
|
mutation createTask($taskGroupID: String!, $name: String!, $position: Float!) {
|
|
|
|
createTask(input: {taskGroupID: $taskGroupID, name: $name, position: $position}) {
|
|
|
|
taskID
|
|
|
|
taskGroup {
|
2020-04-10 21:47:24 +02:00
|
|
|
taskGroupID
|
|
|
|
}
|
2020-04-11 04:22:58 +02:00
|
|
|
name
|
|
|
|
position
|
2020-04-10 05:27:57 +02:00
|
|
|
}
|
2020-04-11 04:22:58 +02:00
|
|
|
}
|
|
|
|
`;
|
2020-04-10 05:27:57 +02:00
|
|
|
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'
|
|
|
|
* },
|
|
|
|
* });
|
|
|
|
*/
|
2020-04-11 04:22:58 +02:00
|
|
|
export function useCreateTaskMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<CreateTaskMutation, CreateTaskMutationVariables>) {
|
|
|
|
return ApolloReactHooks.useMutation<CreateTaskMutation, CreateTaskMutationVariables>(CreateTaskDocument, baseOptions);
|
|
|
|
}
|
2020-04-10 05:27:57 +02:00
|
|
|
export type CreateTaskMutationHookResult = ReturnType<typeof useCreateTaskMutation>;
|
|
|
|
export type CreateTaskMutationResult = ApolloReactCommon.MutationResult<CreateTaskMutation>;
|
2020-04-11 04:22:58 +02:00
|
|
|
export type CreateTaskMutationOptions = ApolloReactCommon.BaseMutationOptions<CreateTaskMutation, CreateTaskMutationVariables>;
|
|
|
|
export const CreateTaskGroupDocument = gql`
|
|
|
|
mutation createTaskGroup($projectID: String!, $name: String!, $position: Float!) {
|
|
|
|
createTaskGroup(input: {projectID: $projectID, name: $name, position: $position}) {
|
|
|
|
taskGroupID
|
|
|
|
name
|
|
|
|
position
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
export type CreateTaskGroupMutationFn = ApolloReactCommon.MutationFunction<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* __useCreateTaskGroupMutation__
|
|
|
|
*
|
|
|
|
* To run a mutation, you first call `useCreateTaskGroupMutation` within a React component and pass it any options that fit your needs.
|
|
|
|
* When your component renders, `useCreateTaskGroupMutation` 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 [createTaskGroupMutation, { data, loading, error }] = useCreateTaskGroupMutation({
|
|
|
|
* variables: {
|
|
|
|
* projectID: // value for 'projectID'
|
|
|
|
* name: // value for 'name'
|
|
|
|
* position: // value for 'position'
|
|
|
|
* },
|
|
|
|
* });
|
|
|
|
*/
|
|
|
|
export function useCreateTaskGroupMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>) {
|
|
|
|
return ApolloReactHooks.useMutation<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>(CreateTaskGroupDocument, baseOptions);
|
|
|
|
}
|
|
|
|
export type CreateTaskGroupMutationHookResult = ReturnType<typeof useCreateTaskGroupMutation>;
|
|
|
|
export type CreateTaskGroupMutationResult = ApolloReactCommon.MutationResult<CreateTaskGroupMutation>;
|
|
|
|
export type CreateTaskGroupMutationOptions = ApolloReactCommon.BaseMutationOptions<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>;
|
2020-04-10 05:27:57 +02:00
|
|
|
export const DeleteTaskDocument = gql`
|
2020-04-11 04:22:58 +02:00
|
|
|
mutation deleteTask($taskID: String!) {
|
|
|
|
deleteTask(input: {taskID: $taskID}) {
|
|
|
|
taskID
|
2020-04-10 05:27:57 +02:00
|
|
|
}
|
2020-04-11 04:22:58 +02:00
|
|
|
}
|
|
|
|
`;
|
2020-04-10 05:27:57 +02:00
|
|
|
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'
|
|
|
|
* },
|
|
|
|
* });
|
|
|
|
*/
|
2020-04-11 04:22:58 +02:00
|
|
|
export function useDeleteTaskMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<DeleteTaskMutation, DeleteTaskMutationVariables>) {
|
|
|
|
return ApolloReactHooks.useMutation<DeleteTaskMutation, DeleteTaskMutationVariables>(DeleteTaskDocument, baseOptions);
|
|
|
|
}
|
2020-04-10 05:27:57 +02:00
|
|
|
export type DeleteTaskMutationHookResult = ReturnType<typeof useDeleteTaskMutation>;
|
|
|
|
export type DeleteTaskMutationResult = ApolloReactCommon.MutationResult<DeleteTaskMutation>;
|
2020-04-11 04:22:58 +02:00
|
|
|
export type DeleteTaskMutationOptions = ApolloReactCommon.BaseMutationOptions<DeleteTaskMutation, DeleteTaskMutationVariables>;
|
2020-04-10 05:27:57 +02:00
|
|
|
export const FindProjectDocument = gql`
|
2020-04-11 04:22:58 +02:00
|
|
|
query findProject($projectId: String!) {
|
|
|
|
findProject(input: {projectId: $projectId}) {
|
|
|
|
name
|
|
|
|
taskGroups {
|
|
|
|
taskGroupID
|
2020-04-10 05:27:57 +02:00
|
|
|
name
|
2020-04-11 04:22:58 +02:00
|
|
|
position
|
|
|
|
tasks {
|
|
|
|
taskID
|
2020-04-10 05:27:57 +02:00
|
|
|
name
|
|
|
|
position
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-11 04:22:58 +02:00
|
|
|
}
|
|
|
|
`;
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* __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'
|
|
|
|
* },
|
|
|
|
* });
|
|
|
|
*/
|
2020-04-11 04:22:58 +02:00
|
|
|
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);
|
|
|
|
}
|
2020-04-10 05:27:57 +02:00
|
|
|
export type FindProjectQueryHookResult = ReturnType<typeof useFindProjectQuery>;
|
|
|
|
export type FindProjectLazyQueryHookResult = ReturnType<typeof useFindProjectLazyQuery>;
|
|
|
|
export type FindProjectQueryResult = ApolloReactCommon.QueryResult<FindProjectQuery, FindProjectQueryVariables>;
|
|
|
|
export const GetProjectsDocument = gql`
|
2020-04-11 04:22:58 +02:00
|
|
|
query getProjects {
|
|
|
|
organizations {
|
|
|
|
name
|
|
|
|
teams {
|
2020-04-10 05:27:57 +02:00
|
|
|
name
|
2020-04-11 04:22:58 +02:00
|
|
|
projects {
|
2020-04-10 05:27:57 +02:00
|
|
|
name
|
2020-04-11 04:22:58 +02:00
|
|
|
projectID
|
2020-04-10 05:27:57 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-11 04:22:58 +02:00
|
|
|
}
|
|
|
|
`;
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* __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: {
|
|
|
|
* },
|
|
|
|
* });
|
|
|
|
*/
|
2020-04-11 04:22:58 +02:00
|
|
|
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);
|
|
|
|
}
|
2020-04-10 05:27:57 +02:00
|
|
|
export type GetProjectsQueryHookResult = ReturnType<typeof useGetProjectsQuery>;
|
|
|
|
export type GetProjectsLazyQueryHookResult = ReturnType<typeof useGetProjectsLazyQuery>;
|
|
|
|
export type GetProjectsQueryResult = ApolloReactCommon.QueryResult<GetProjectsQuery, GetProjectsQueryVariables>;
|
|
|
|
export const UpdateTaskLocationDocument = gql`
|
2020-04-11 04:22:58 +02:00
|
|
|
mutation updateTaskLocation($taskID: String!, $taskGroupID: String!, $position: Float!) {
|
|
|
|
updateTaskLocation(input: {taskID: $taskID, taskGroupID: $taskGroupID, position: $position}) {
|
|
|
|
taskID
|
|
|
|
createdAt
|
|
|
|
name
|
|
|
|
position
|
2020-04-10 05:27:57 +02:00
|
|
|
}
|
2020-04-11 04:22:58 +02:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
export type UpdateTaskLocationMutationFn = ApolloReactCommon.MutationFunction<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>;
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* __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'
|
|
|
|
* },
|
|
|
|
* });
|
|
|
|
*/
|
2020-04-11 04:22:58 +02:00
|
|
|
export function useUpdateTaskLocationMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>) {
|
|
|
|
return ApolloReactHooks.useMutation<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>(UpdateTaskLocationDocument, baseOptions);
|
|
|
|
}
|
2020-04-10 05:27:57 +02:00
|
|
|
export type UpdateTaskLocationMutationHookResult = ReturnType<typeof useUpdateTaskLocationMutation>;
|
|
|
|
export type UpdateTaskLocationMutationResult = ApolloReactCommon.MutationResult<UpdateTaskLocationMutation>;
|
2020-04-11 04:22:58 +02:00
|
|
|
export type UpdateTaskLocationMutationOptions = ApolloReactCommon.BaseMutationOptions<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>;
|
2020-04-10 05:27:57 +02:00
|
|
|
export const UpdateTaskNameDocument = gql`
|
2020-04-11 04:22:58 +02:00
|
|
|
mutation updateTaskName($taskID: String!, $name: String!) {
|
|
|
|
updateTaskName(input: {taskID: $taskID, name: $name}) {
|
|
|
|
taskID
|
|
|
|
name
|
|
|
|
position
|
2020-04-10 05:27:57 +02:00
|
|
|
}
|
2020-04-11 04:22:58 +02:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
export type UpdateTaskNameMutationFn = ApolloReactCommon.MutationFunction<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>;
|
2020-04-10 05:27:57 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* __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'
|
|
|
|
* },
|
|
|
|
* });
|
|
|
|
*/
|
2020-04-11 04:22:58 +02:00
|
|
|
export function useUpdateTaskNameMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>) {
|
|
|
|
return ApolloReactHooks.useMutation<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>(UpdateTaskNameDocument, baseOptions);
|
|
|
|
}
|
2020-04-10 05:27:57 +02:00
|
|
|
export type UpdateTaskNameMutationHookResult = ReturnType<typeof useUpdateTaskNameMutation>;
|
|
|
|
export type UpdateTaskNameMutationResult = ApolloReactCommon.MutationResult<UpdateTaskNameMutation>;
|
2020-04-11 04:22:58 +02:00
|
|
|
export type UpdateTaskNameMutationOptions = ApolloReactCommon.BaseMutationOptions<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>;
|