From 229a53fa0a88d72724f53f0f39e9cb4be135caa4 Mon Sep 17 00:00:00 2001 From: Jordan Knott Date: Wed, 28 Apr 2021 21:32:19 -0500 Subject: [PATCH] refactor: replace refresh & access token with auth token only changes authentication to no longer use a refresh token & access token for accessing protected endpoints. Instead only an auth token is used. Before the login flow was: Login -> get refresh (stored as HttpOnly cookie) + access token (stored in memory) -> protected endpoint request (attach access token as Authorization header) -> access token expires in 15 minutes, so use refresh token to obtain new one when that happens now it looks like this: Login -> get auth token (stored as HttpOnly cookie) -> make protected endpont request (token sent) the reasoning for using the refresh + access token was to reduce DB calls, but in the end I don't think its worth the hassle. --- frontend/package.json | 2 +- frontend/src/Admin/index.tsx | 6 +- frontend/src/App/Routes.tsx | 30 +- frontend/src/App/TopNavbar.tsx | 34 +- frontend/src/App/cache.ts | 2 +- frontend/src/App/context.ts | 69 +- frontend/src/App/index.tsx | 16 +- frontend/src/Auth/index.tsx | 37 +- frontend/src/Confirm/index.tsx | 16 +- frontend/src/Profile/index.tsx | 8 +- frontend/src/Projects/Project/Board/index.tsx | 2 +- .../src/Projects/Project/Details/index.tsx | 2 +- frontend/src/Projects/index.tsx | 8 +- frontend/src/Teams/Members/index.tsx | 23 +- frontend/src/Teams/index.tsx | 5 +- frontend/src/index.tsx | 138 +- .../src/shared/components/AddList/Styles.ts | 2 +- .../src/shared/components/AddList/index.tsx | 1 + frontend/src/shared/components/Card/Styles.ts | 4 +- .../shared/components/TaskDetails/remark.js | 2 +- frontend/src/shared/generated/graphql.tsx | 2031 ++++---- frontend/src/shared/utils/accessToken.ts | 18 - frontend/src/shared/utils/user.ts | 5 - frontend/src/taskcafe.d.ts | 5 - frontend/yarn.lock | 8 +- go.mod | 6 +- go.sum | 19 +- internal/auth/auth.go | 117 - internal/auth/auth_test.go | 56 - internal/commands/commands.go | 2 +- internal/commands/token.go | 35 - internal/db/models.go | 14 +- internal/db/querier.go | 8 +- internal/db/query/token.sql | 18 +- internal/db/token.sql.go | 60 +- internal/graph/generated.go | 4424 ++++++++++------- internal/graph/graph.go | 41 +- internal/graph/models_gen.go | 16 +- internal/graph/schema.graphqls | 26 +- internal/graph/schema.resolvers.go | 63 +- internal/graph/schema/_models.gql | 20 +- internal/graph/schema/_root.gql | 1 + internal/graph/schema/user.gql | 5 - internal/route/auth.go | 221 +- internal/route/middleware.go | 65 +- internal/route/route.go | 14 +- ..._rename-refresh_token-to-auth_token.up.sql | 1 + 47 files changed, 3989 insertions(+), 3717 deletions(-) delete mode 100644 frontend/src/shared/utils/accessToken.ts delete mode 100644 frontend/src/shared/utils/user.ts delete mode 100644 internal/auth/auth.go delete mode 100644 internal/auth/auth_test.go delete mode 100644 internal/commands/token.go create mode 100644 migrations/0064_rename-refresh_token-to-auth_token.up.sql diff --git a/frontend/package.json b/frontend/package.json index 60e6da7..bddae34 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -39,7 +39,7 @@ "dayjs": "^1.9.1", "dompurify": "^2.2.6", "emoji-mart": "^3.0.0", - "emoticon": "^3.2.0", + "emoticon": "^4.0.0", "graphql": "^15.0.0", "graphql-tag": "^2.10.3", "history": "^4.10.1", diff --git a/frontend/src/Admin/index.tsx b/frontend/src/Admin/index.tsx index 402d8ce..3d01341 100644 --- a/frontend/src/Admin/index.tsx +++ b/frontend/src/Admin/index.tsx @@ -215,9 +215,12 @@ const AdminRoute = () => { }, }); if (data && user) { + /* +TODO: add permision check if (user.roles.org !== 'admin') { return ; } + */ return ( <> @@ -225,7 +228,8 @@ const AdminRoute = () => { initialTab={0} users={data.users} invitedUsers={data.invitedUsers} - canInviteUser={user.roles.org === 'admin'} + // canInviteUser={user.roles.org === 'admin'} TODO: add permision check + canInviteUser={true} onInviteUser={NOOP} onUpdateUserPassword={() => { hidePopup(); diff --git a/frontend/src/App/Routes.tsx b/frontend/src/App/Routes.tsx index 480c16e..3c4f227 100644 --- a/frontend/src/App/Routes.tsx +++ b/frontend/src/App/Routes.tsx @@ -13,8 +13,6 @@ import Login from 'Auth'; import Register from 'Register'; import Profile from 'Profile'; import styled from 'styled-components'; -import JwtDecode from 'jwt-decode'; -import { setAccessToken } from 'shared/utils/accessToken'; import { useCurrentUser } from 'App/context'; const MainContent = styled.div` @@ -26,9 +24,9 @@ const MainContent = styled.div` flex-grow: 1; `; -type RefreshTokenResponse = { - accessToken: string; - setup?: null | { confirmToken: string }; +type ValidateTokenResponse = { + valid: boolean; + userID: string; }; const AuthorizedRoutes = () => { @@ -36,27 +34,17 @@ const AuthorizedRoutes = () => { const [loading, setLoading] = useState(true); const { setUser } = useCurrentUser(); useEffect(() => { - fetch('/auth/refresh_token', { + fetch('/auth/validate', { method: 'POST', credentials: 'include', }).then(async x => { const { status } = x; - if (status === 400) { - history.replace('/login'); + const response: ValidateTokenResponse = await x.json(); + const { valid, userID } = response; + if (!valid) { + history.replace(`/login`); } else { - const response: RefreshTokenResponse = await x.json(); - const { accessToken, setup } = response; - if (setup) { - history.replace(`/register?confirmToken=${setup.confirmToken}`); - } else { - const claims: JWTToken = JwtDecode(accessToken); - const currentUser = { - id: claims.userId, - roles: { org: claims.orgRole, teams: new Map(), projects: new Map() }, - }; - setUser(currentUser); - setAccessToken(accessToken); - } + setUser(userID); } setLoading(false); }); diff --git a/frontend/src/App/TopNavbar.tsx b/frontend/src/App/TopNavbar.tsx index e1d8e55..bc2bb59 100644 --- a/frontend/src/App/TopNavbar.tsx +++ b/frontend/src/App/TopNavbar.tsx @@ -3,13 +3,8 @@ import TopNavbar, { MenuItem } from 'shared/components/TopNavbar'; import { ProfileMenu } from 'shared/components/DropdownMenu'; import ProjectSettings, { DeleteConfirm, DELETE_INFO } from 'shared/components/ProjectSettings'; import { useHistory } from 'react-router'; -import { PermissionLevel, PermissionObjectType, useCurrentUser } from 'App/context'; -import { - RoleCode, - useTopNavbarQuery, - useDeleteProjectMutation, - GetProjectsDocument, -} from 'shared/generated/graphql'; +import { useCurrentUser } from 'App/context'; +import { RoleCode, useTopNavbarQuery, useDeleteProjectMutation, GetProjectsDocument } from 'shared/generated/graphql'; import { usePopup, Popup } from 'shared/components/PopupMenu'; import produce from 'immer'; import MiniProfile from 'shared/components/MiniProfile'; @@ -107,23 +102,10 @@ const GlobalTopNavbar: React.FC = ({ onRemoveInvitedFromBoard, onRemoveFromBoard, }) => { - const { user, setUserRoles, setUser } = useCurrentUser(); + const { user, setUser } = useCurrentUser(); const { loading, data } = useTopNavbarQuery({ - onCompleted: response => { - if (user && user.roles) { - setUserRoles({ - org: user.roles.org, - teams: response.me.teamRoles.reduce((map, obj) => { - map.set(obj.teamID, obj.roleCode); - return map; - }, new Map()), - projects: response.me.projectRoles.reduce((map, obj) => { - map.set(obj.projectID, obj.roleCode); - return map; - }, new Map()), - }); - } - }, + // TODO: maybe remove? + onCompleted: response => {}, }); const { showPopup, hidePopup } = usePopup(); const history = useHistory(); @@ -147,7 +129,7 @@ const GlobalTopNavbar: React.FC = ({ { history.push('/admin'); hidePopup(); @@ -189,7 +171,9 @@ const GlobalTopNavbar: React.FC = ({ if (!user) { return null; } - const userIsTeamOrProjectAdmin = user.isAdmin(PermissionLevel.TEAM, PermissionObjectType.TEAM, teamID); + // TODO: readd permision check + // const userIsTeamOrProjectAdmin = user.isAdmin(PermissionLevel.TEAM, PermissionObjectType.TEAM, teamID); + const userIsTeamOrProjectAdmin = true; const onInvitedMemberProfile = ($targetRef: React.RefObject, email: string) => { const member = projectInvitedMembers ? projectInvitedMembers.find(u => u.email === email) : null; if (member) { diff --git a/frontend/src/App/cache.ts b/frontend/src/App/cache.ts index 48b5e73..e6080a6 100644 --- a/frontend/src/App/cache.ts +++ b/frontend/src/App/cache.ts @@ -1,4 +1,4 @@ -import { InMemoryCache } from 'apollo-cache-inmemory'; +import { InMemoryCache } from '@apollo/client'; const cache = new InMemoryCache(); diff --git a/frontend/src/App/context.ts b/frontend/src/App/context.ts index 13f5f2e..fe8c419 100644 --- a/frontend/src/App/context.ts +++ b/frontend/src/App/context.ts @@ -1,79 +1,20 @@ import React, { useContext } from 'react'; -export enum PermissionLevel { - ORG, - TEAM, - PROJECT, -} - -export enum PermissionObjectType { - ORG, - TEAM, - PROJECT, - TASK, -} - -export type CurrentUserRoles = { - org: string; - teams: Map; - projects: Map; -}; - -export interface CurrentUserRaw { - id: string; - roles: CurrentUserRoles; -} - type UserContextState = { - user: CurrentUserRaw | null; - setUser: (user: CurrentUserRaw | null) => void; - setUserRoles: (roles: CurrentUserRoles) => void; + user: string | null; + setUser: (user: string | null) => void; }; + export const UserContext = React.createContext({ user: null, setUser: _user => null, - setUserRoles: roles => null, }); -export interface CurrentUser extends CurrentUserRaw { - isAdmin: (level: PermissionLevel, objectType: PermissionObjectType, subjectID?: string | null) => boolean; - isVisible: (level: PermissionLevel, objectType: PermissionObjectType, subjectID?: string | null) => boolean; -} - export const useCurrentUser = () => { - const { user, setUser, setUserRoles } = useContext(UserContext); - let currentUser: CurrentUser | null = null; - if (user) { - currentUser = { - ...user, - isAdmin(level: PermissionLevel, objectType: PermissionObjectType, subjectID?: string | null) { - if (user.roles.org === 'admin') { - return true; - } - switch (level) { - case PermissionLevel.TEAM: - return subjectID ? this.roles.teams.get(subjectID) === 'admin' : false; - default: - return false; - } - }, - isVisible(level: PermissionLevel, objectType: PermissionObjectType, subjectID?: string | null) { - if (user.roles.org === 'admin') { - return true; - } - switch (level) { - case PermissionLevel.TEAM: - return subjectID ? this.roles.teams.get(subjectID) !== null : false; - default: - return false; - } - }, - }; - } + const { user, setUser } = useContext(UserContext); return { - user: currentUser, + user, setUser, - setUserRoles, }; }; diff --git a/frontend/src/App/index.tsx b/frontend/src/App/index.tsx index f5ba404..8aa4990 100644 --- a/frontend/src/App/index.tsx +++ b/frontend/src/App/index.tsx @@ -1,16 +1,14 @@ import React, { useState, useEffect } from 'react'; -import jwtDecode from 'jwt-decode'; import { createBrowserHistory } from 'history'; import { Router } from 'react-router'; import { PopupProvider } from 'shared/components/PopupMenu'; import { ToastContainer } from 'react-toastify'; -import { setAccessToken } from 'shared/utils/accessToken'; import styled, { ThemeProvider } from 'styled-components'; import NormalizeStyles from './NormalizeStyles'; import BaseStyles from './BaseStyles'; import theme from './ThemeStyles'; import Routes from './Routes'; -import { UserContext, CurrentUserRaw, CurrentUserRoles, PermissionLevel, PermissionObjectType } from './context'; +import { UserContext } from './context'; import 'react-toastify/dist/ReactToastify.css'; @@ -48,19 +46,11 @@ const StyledContainer = styled(ToastContainer).attrs({ const history = createBrowserHistory(); const App = () => { - const [user, setUser] = useState(null); - const setUserRoles = (roles: CurrentUserRoles) => { - if (user) { - setUser({ - ...user, - roles, - }); - } - }; + const [user, setUser] = useState(null); return ( <> - + diff --git a/frontend/src/Auth/index.tsx b/frontend/src/Auth/index.tsx index d4564d3..5b9d324 100644 --- a/frontend/src/Auth/index.tsx +++ b/frontend/src/Auth/index.tsx @@ -1,7 +1,5 @@ import React, { useState, useEffect, useContext } from 'react'; import { useHistory } from 'react-router'; -import JwtDecode from 'jwt-decode'; -import { setAccessToken } from 'shared/utils/accessToken'; import Login from 'shared/components/Login'; import UserContext from 'App/context'; import { Container, LoginWrapper } from './Styles'; @@ -30,42 +28,23 @@ const Auth = () => { setComplete(true); } else { const response = await x.json(); - const { accessToken } = response; - const claims: JWTToken = JwtDecode(accessToken); - const currentUser = { - id: claims.userId, - roles: { org: claims.orgRole, teams: new Map(), projects: new Map() }, - }; - setUser(currentUser); - setComplete(true); - setAccessToken(accessToken); - + const { userID } = response; + setUser(userID); history.push('/'); } }); }; useEffect(() => { - fetch('/auth/refresh_token', { + fetch('/auth/validate', { method: 'POST', credentials: 'include', }).then(async x => { - const { status } = x; - if (status === 200) { - const response: RefreshTokenResponse = await x.json(); - const { accessToken, setup } = response; - if (setup) { - history.replace(`/register?confirmToken=${setup.confirmToken}`); - } else { - const claims: JWTToken = JwtDecode(accessToken); - const currentUser = { - id: claims.userId, - roles: { org: claims.orgRole, teams: new Map(), projects: new Map() }, - }; - setUser(currentUser); - setAccessToken(accessToken); - history.replace('/projects'); - } + const response = await x.json(); + const { valid, userID } = response; + if (valid) { + setUser(userID); + history.replace('/projects'); } }); }, []); diff --git a/frontend/src/Confirm/index.tsx b/frontend/src/Confirm/index.tsx index e34d923..818acfa 100644 --- a/frontend/src/Confirm/index.tsx +++ b/frontend/src/Confirm/index.tsx @@ -5,8 +5,6 @@ import { useHistory, useLocation } from 'react-router'; import * as QueryString from 'query-string'; import { toast } from 'react-toastify'; import { Container, LoginWrapper } from './Styles'; -import JwtDecode from 'jwt-decode'; -import { setAccessToken } from 'shared/utils/accessToken'; import { useCurrentUser } from 'App/context'; const UsersConfirm = () => { @@ -31,18 +29,8 @@ const UsersConfirm = () => { const { status } = x; if (status === 200) { const response = await x.json(); - const { accessToken } = response; - const claims: JWTToken = JwtDecode(accessToken); - const currentUser = { - id: claims.userId, - roles: { - org: claims.orgRole, - teams: new Map(), - projects: new Map(), - }, - }; - setUser(currentUser); - setAccessToken(accessToken); + const { userID } = response; + setUser(userID); history.push('/'); } else { setFailed(); diff --git a/frontend/src/Profile/index.tsx b/frontend/src/Profile/index.tsx index aff2e0f..fdec70e 100644 --- a/frontend/src/Profile/index.tsx +++ b/frontend/src/Profile/index.tsx @@ -1,7 +1,6 @@ import React, { useRef, useEffect } from 'react'; import styled from 'styled-components/macro'; import GlobalTopNavbar from 'App/TopNavbar'; -import { getAccessToken } from 'shared/utils/accessToken'; import Settings from 'shared/components/Settings'; import { useMeQuery, @@ -49,12 +48,9 @@ const Projects = () => { if (e.target.files) { const fileData = new FormData(); fileData.append('file', e.target.files[0]); - const accessToken = getAccessToken(); axios .post('/users/me/avatar', fileData, { - headers: { - Authorization: `Bearer ${accessToken}`, - }, + withCredentials: true, }) .then(res => { if ($fileUpload && $fileUpload.current) { @@ -75,7 +71,7 @@ const Projects = () => { } }} onResetPassword={(password, done) => { - updateUserPassword({ variables: { userID: user.id, password } }); + updateUserPassword({ variables: { userID: user, password } }); toast('Password was changed!'); done(); }} diff --git a/frontend/src/Projects/Project/Board/index.tsx b/frontend/src/Projects/Project/Board/index.tsx index 1ef8217..90d16f8 100644 --- a/frontend/src/Projects/Project/Board/index.tsx +++ b/frontend/src/Projects/Project/Board/index.tsx @@ -543,7 +543,7 @@ const ProjectBoard: React.FC = ({ projectID, onCardLabelClick onChangeTaskMetaFilter={filter => { setTaskMetaFilters(filter); }} - userID={user?.id} + userID={user ?? ''} labels={labelsRef} members={membersRef} />, diff --git a/frontend/src/Projects/Project/Details/index.tsx b/frontend/src/Projects/Project/Details/index.tsx index b59c155..f3962ed 100644 --- a/frontend/src/Projects/Project/Details/index.tsx +++ b/frontend/src/Projects/Project/Details/index.tsx @@ -541,7 +541,7 @@ const Details: React.FC = ({ bio="None" onRemoveFromTask={() => { if (user) { - unassignTask({ variables: { taskID: data.findTask.id, userID: user.id } }); + unassignTask({ variables: { taskID: data.findTask.id, userID: user ?? '' } }); } }} /> diff --git a/frontend/src/Projects/index.tsx b/frontend/src/Projects/index.tsx index 649d917..6eb9387 100644 --- a/frontend/src/Projects/index.tsx +++ b/frontend/src/Projects/index.tsx @@ -12,7 +12,7 @@ import { import { Link } from 'react-router-dom'; import NewProject from 'shared/components/NewProject'; -import { PermissionLevel, PermissionObjectType, useCurrentUser } from 'App/context'; +import { useCurrentUser } from 'App/context'; import Button from 'shared/components/Button'; import { usePopup, Popup } from 'shared/components/PopupMenu'; import { useForm } from 'react-hook-form'; @@ -268,7 +268,7 @@ const Projects = () => { - {user.roles.org === 'admin' && ( + {true && ( // TODO: add permision check { @@ -330,7 +330,7 @@ const Projects = () => {
{team.name} - {user.isAdmin(PermissionLevel.TEAM, PermissionObjectType.TEAM, team.id) && ( + {true && ( // TODO: add permision check Projects @@ -355,7 +355,7 @@ const Projects = () => { ))} - {user.isAdmin(PermissionLevel.TEAM, PermissionObjectType.TEAM, team.id) && ( + {true && ( // TODO: add permision check { diff --git a/frontend/src/Teams/Members/index.tsx b/frontend/src/Teams/Members/index.tsx index b9fb940..f8eeb4a 100644 --- a/frontend/src/Teams/Members/index.tsx +++ b/frontend/src/Teams/Members/index.tsx @@ -3,7 +3,7 @@ import Input from 'shared/components/Input'; import updateApolloCache from 'shared/utils/cache'; import produce from 'immer'; import Button from 'shared/components/Button'; -import { useCurrentUser, PermissionLevel, PermissionObjectType } from 'App/context'; +import { useCurrentUser } from 'App/context'; import Select from 'shared/components/Select'; import { useGetTeamQuery, @@ -424,7 +424,7 @@ const Members: React.FC = ({ teamID }) => { fetchPolicy: 'cache-and-network', pollInterval: 3000, }); - const { user, setUserRoles } = useCurrentUser(); + const { user } = useCurrentUser(); const warning = 'You can’t leave because you are the only admin. To make another user an admin, click their avatar, select “Change permissions…”, and select “Admin”.'; const [createTeamMember] = useCreateTeamMemberMutation({ @@ -446,17 +446,7 @@ const Members: React.FC = ({ teamID }) => { ); }, }); - const [updateTeamMemberRole] = useUpdateTeamMemberRoleMutation({ - onCompleted: r => { - if (user) { - setUserRoles( - produce(user.roles, draftRoles => { - draftRoles.teams.set(r.updateTeamMemberRole.teamID, r.updateTeamMemberRole.member.role.code); - }), - ); - } - }, - }); + const [updateTeamMemberRole] = useUpdateTeamMemberRoleMutation(); const [deleteTeamMember] = useDeleteTeamMemberMutation({ update: (client, response) => { updateApolloCache( @@ -491,7 +481,7 @@ const Members: React.FC = ({ teamID }) => { - {user.isAdmin(PermissionLevel.TEAM, PermissionObjectType.TEAM, data.findTeam.id) && ( + {true && ( // TODO: add permission check { showPopup( @@ -528,11 +518,12 @@ const Members: React.FC = ({ teamID }) => { showPopup( $target, { updateTeamMemberRole({ variables: { userID: member.id, teamID, roleCode } }); }} diff --git a/frontend/src/Teams/index.tsx b/frontend/src/Teams/index.tsx index b9b3dbb..34eea54 100644 --- a/frontend/src/Teams/index.tsx +++ b/frontend/src/Teams/index.tsx @@ -13,7 +13,7 @@ import { usePopup, Popup } from 'shared/components/PopupMenu'; import { History } from 'history'; import produce from 'immer'; import { TeamSettings, DeleteConfirm, DELETE_INFO } from 'shared/components/ProjectSettings'; -import { PermissionObjectType, PermissionLevel, useCurrentUser } from 'App/context'; +import { useCurrentUser } from 'App/context'; import NOOP from 'shared/utils/noop'; import Members from './Members'; import Projects from './Projects'; @@ -95,9 +95,12 @@ const Teams = () => { const [currentTab, setCurrentTab] = useState(0); const match = useRouteMatch(); if (data && user) { + /* +TODO: re-add permission check if (!user.isVisible(PermissionLevel.TEAM, PermissionObjectType.TEAM, teamID)) { return ; } + */ return ( <> - axios.post('/auth/refresh_token', {}, { withCredentials: true }).then(tokenRefreshResponse => { - setAccessToken(tokenRefreshResponse.data.accessToken); - failedRequest.response.config.headers.Authorization = `Bearer ${tokenRefreshResponse.data.accessToken}`; - return Promise.resolve(); - }); - -createAuthRefreshInterceptor(axios, refreshAuthLogic); - -const resolvePendingRequests = () => { - pendingRequests.map((callback: any) => callback()); - pendingRequests = []; -}; - -const resolvePromise = (resolve: () => void) => { - pendingRequests.push(() => resolve()); -}; - -const resetPendingRequests = () => { - pendingRequests = []; -}; - -const setRefreshing = (newVal: boolean) => { - isRefreshing = newVal; -}; - -const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => { - if (graphQLErrors) { - for (const err of graphQLErrors) { - if (err.extensions && err.extensions.code) { - switch (err.extensions.code) { - case 'UNAUTHENTICATED': - if (!isRefreshing) { - setRefreshing(true); - forward$ = fromPromise( - getNewToken() - .then((response: any) => { - setAccessToken(response.accessToken); - resolvePendingRequests(); - return response.accessToken; - }) - .catch(() => { - resetPendingRequests(); - // TODO - // Handle token refresh errors e.g clear stored tokens, redirect to login, ... - return undefined; - }) - .finally(() => { - setRefreshing(false); - }), - ).filter(value => Boolean(value)); - } else { - forward$ = fromPromise(new Promise(resolvePromise)); - } - return forward$.flatMap(() => forward(operation)); - default: - // pass - } - } - } - } - if (networkError) { - console.log(`[Network error]: ${networkError}`); // eslint-disable-line no-console - } - return undefined; -}); - -const requestLink = new ApolloLink( - (operation, forward) => - new Observable((observer: any) => { - let handle: any; - Promise.resolve(operation) - .then((op: any) => { - const accessToken = getAccessToken(); - if (accessToken) { - op.setContext({ - headers: { - Authorization: `Bearer ${accessToken}`, - }, - }); - } - }) - .then(() => { - handle = forward(operation).subscribe({ - next: observer.next.bind(observer), - error: observer.error.bind(observer), - complete: observer.complete.bind(observer), - }); - }) - .catch(observer.error.bind(observer)); - - return () => { - if (handle) { - handle.unsubscribe(); - } - }; - }), -); - -const client = new ApolloClient({ - link: ApolloLink.from([ - onError(({ graphQLErrors, networkError }) => { - if (graphQLErrors) { - graphQLErrors.forEach( - ({ message, locations, path }) => - console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`), // eslint-disable-line no-console - ); - } - if (networkError) { - console.log(`[Network error]: ${networkError}`); // eslint-disable-line no-console - } - }), - errorLink, - requestLink, - new HttpLink({ - uri: '/graphql', - credentials: 'same-origin', - }), - ]), - cache, -}); +const client = new ApolloClient({ uri: '/graphql', cache }); +console.log('cloient', client); ReactDOM.render( diff --git a/frontend/src/shared/components/AddList/Styles.ts b/frontend/src/shared/components/AddList/Styles.ts index d9076bd..4e32fac 100644 --- a/frontend/src/shared/components/AddList/Styles.ts +++ b/frontend/src/shared/components/AddList/Styles.ts @@ -1,5 +1,5 @@ import styled, { css } from 'styled-components'; -import TextareaAutosize from 'react-autosize-textarea/lib'; +import TextareaAutosize from 'react-autosize-textarea'; import { mixin } from 'shared/utils/styles'; import Button from 'shared/components/Button'; diff --git a/frontend/src/shared/components/AddList/index.tsx b/frontend/src/shared/components/AddList/index.tsx index 3992fc9..b347efa 100644 --- a/frontend/src/shared/components/AddList/index.tsx +++ b/frontend/src/shared/components/AddList/index.tsx @@ -49,6 +49,7 @@ export const NameEditor: React.FC = ({ onSave: handleSave, onCa ) => setListName(e.currentTarget.value)} diff --git a/frontend/src/shared/components/Card/Styles.ts b/frontend/src/shared/components/Card/Styles.ts index fd43ddf..23f0f91 100644 --- a/frontend/src/shared/components/Card/Styles.ts +++ b/frontend/src/shared/components/Card/Styles.ts @@ -10,6 +10,7 @@ export const CardMember = styled(TaskAssignee)<{ zIndex: number }>` z-index: ${props => props.zIndex}; position: relative; `; + export const ChecklistIcon = styled(CheckSquareOutline)<{ color: 'success' | 'normal' }>` ${props => props.color === 'success' && @@ -18,6 +19,7 @@ export const ChecklistIcon = styled(CheckSquareOutline)<{ color: 'success' | 'no stroke: ${props.theme.colors.success}; `} `; + export const ClockIcon = styled(Clock)<{ color: string }>` fill: ${props => props.color}; `; @@ -26,7 +28,7 @@ export const EditorTextarea = styled(TextareaAutosize)` overflow: hidden; overflow-wrap: break-word; resize: none; - height: 90px; + height: 54px; width: 100%; background: none; diff --git a/frontend/src/shared/components/TaskDetails/remark.js b/frontend/src/shared/components/TaskDetails/remark.js index 01635fd..f151344 100644 --- a/frontend/src/shared/components/TaskDetails/remark.js +++ b/frontend/src/shared/components/TaskDetails/remark.js @@ -1,6 +1,6 @@ import visit from 'unist-util-visit'; import emoji from 'node-emoji'; -import emoticon from 'emoticon'; +import { emoticon } from 'emoticon'; import { Emoji } from 'emoji-mart'; import React from 'react'; diff --git a/frontend/src/shared/generated/graphql.tsx b/frontend/src/shared/generated/graphql.tsx index 2a2ec75..0851447 100644 --- a/frontend/src/shared/generated/graphql.tsx +++ b/frontend/src/shared/generated/graphql.tsx @@ -1,10 +1,10 @@ -import gql from 'graphql-tag'; -import * as ApolloReactCommon from '@apollo/react-common'; -import * as ApolloReactHooks from '@apollo/react-hooks'; +import { gql } from '@apollo/client'; +import * as Apollo from '@apollo/client'; export type Maybe = T | null; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +const defaultOptions = {} /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; @@ -18,171 +18,15 @@ export type Scalars = { }; - - - -export enum RoleCode { - Owner = 'owner', - Admin = 'admin', - Member = 'member', - Observer = 'observer' +export enum ActionLevel { + Org = 'ORG', + Team = 'TEAM', + Project = 'PROJECT' } -export type ProjectLabel = { - __typename?: 'ProjectLabel'; - id: Scalars['ID']; - createdDate: Scalars['Time']; - labelColor: LabelColor; - name?: Maybe; -}; - -export type LabelColor = { - __typename?: 'LabelColor'; - id: Scalars['ID']; - name: Scalars['String']; - position: Scalars['Float']; - colorHex: Scalars['String']; -}; - -export type TaskLabel = { - __typename?: 'TaskLabel'; - id: Scalars['ID']; - projectLabel: ProjectLabel; - assignedDate: Scalars['Time']; -}; - -export type ProfileIcon = { - __typename?: 'ProfileIcon'; - url?: Maybe; - initials?: Maybe; - bgColor?: Maybe; -}; - -export type OwnersList = { - __typename?: 'OwnersList'; - projects: Array; - teams: Array; -}; - -export type Member = { - __typename?: 'Member'; - id: Scalars['ID']; - role: Role; - fullName: Scalars['String']; - username: Scalars['String']; - profileIcon: ProfileIcon; - owned: OwnedList; - member: MemberList; -}; - -export type RefreshToken = { - __typename?: 'RefreshToken'; - id: Scalars['ID']; - userId: Scalars['UUID']; - expiresAt: Scalars['Time']; - createdAt: Scalars['Time']; -}; - -export type Role = { - __typename?: 'Role'; - code: Scalars['String']; - name: Scalars['String']; -}; - -export type OwnedList = { - __typename?: 'OwnedList'; - teams: Array; - projects: Array; -}; - -export type MemberList = { - __typename?: 'MemberList'; - teams: Array; - projects: Array; -}; - -export type UserAccount = { - __typename?: 'UserAccount'; - id: Scalars['ID']; - email: Scalars['String']; - createdAt: Scalars['Time']; - fullName: Scalars['String']; - initials: Scalars['String']; - bio: Scalars['String']; - role: Role; - username: Scalars['String']; - profileIcon: ProfileIcon; - owned: OwnedList; - member: MemberList; -}; - -export type InvitedUserAccount = { - __typename?: 'InvitedUserAccount'; - id: Scalars['ID']; - email: Scalars['String']; - invitedOn: Scalars['Time']; - member: MemberList; -}; - -export type Team = { - __typename?: 'Team'; - id: Scalars['ID']; - createdAt: Scalars['Time']; - name: Scalars['String']; - members: Array; -}; - -export type InvitedMember = { - __typename?: 'InvitedMember'; - email: Scalars['String']; - invitedOn: Scalars['Time']; -}; - -export type Project = { - __typename?: 'Project'; - id: Scalars['ID']; - createdAt: Scalars['Time']; - name: Scalars['String']; - team?: Maybe; - taskGroups: Array; - members: Array; - invitedMembers: Array; - labels: Array; -}; - -export type TaskGroup = { - __typename?: 'TaskGroup'; - id: Scalars['ID']; - projectID: Scalars['String']; - createdAt: Scalars['Time']; - name: Scalars['String']; - position: Scalars['Float']; - tasks: Array; -}; - -export type ChecklistBadge = { - __typename?: 'ChecklistBadge'; - complete: Scalars['Int']; - total: Scalars['Int']; -}; - -export type TaskBadges = { - __typename?: 'TaskBadges'; - checklist?: Maybe; -}; - -export type CausedBy = { - __typename?: 'CausedBy'; - id: Scalars['ID']; - fullName: Scalars['String']; - profileIcon?: Maybe; -}; - -export type TaskActivityData = { - __typename?: 'TaskActivityData'; - name: Scalars['String']; - value: Scalars['String']; -}; +export enum ActionType { + TaskMemberAdded = 'TASK_MEMBER_ADDED' +} export enum ActivityType { TaskAdded = 'TASK_ADDED', @@ -197,33 +41,65 @@ export enum ActivityType { TaskChecklistRemoved = 'TASK_CHECKLIST_REMOVED' } -export type TaskActivity = { - __typename?: 'TaskActivity'; - id: Scalars['ID']; - type: ActivityType; - data: Array; - causedBy: CausedBy; - createdAt: Scalars['Time']; +export enum ActorType { + User = 'USER' +} + +export type AddTaskLabelInput = { + taskID: Scalars['UUID']; + projectLabelID: Scalars['UUID']; }; -export type Task = { - __typename?: 'Task'; +export type AssignTaskInput = { + taskID: Scalars['UUID']; + userID: Scalars['UUID']; +}; + +export type CausedBy = { + __typename?: 'CausedBy'; id: Scalars['ID']; - taskGroup: TaskGroup; - createdAt: Scalars['Time']; + fullName: Scalars['String']; + profileIcon?: Maybe; +}; + +export type ChecklistBadge = { + __typename?: 'ChecklistBadge'; + complete: Scalars['Int']; + total: Scalars['Int']; +}; + +export type CreateTaskChecklist = { + taskID: Scalars['UUID']; name: Scalars['String']; position: Scalars['Float']; - description?: Maybe; - dueDate?: Maybe; - hasTime: Scalars['Boolean']; - complete: Scalars['Boolean']; - completedAt?: Maybe; - assigned: Array; - labels: Array; - checklists: Array; - badges: TaskBadges; - activity: Array; - comments: Array; +}; + +export type CreateTaskChecklistItem = { + taskChecklistID: Scalars['UUID']; + name: Scalars['String']; + position: Scalars['Float']; +}; + +export type CreateTaskComment = { + taskID: Scalars['UUID']; + message: Scalars['String']; +}; + +export type CreateTaskCommentPayload = { + __typename?: 'CreateTaskCommentPayload'; + taskID: Scalars['UUID']; + comment: TaskComment; +}; + +export type CreateTeamMember = { + userID: Scalars['UUID']; + teamID: Scalars['UUID']; +}; + +export type CreateTeamMemberPayload = { + __typename?: 'CreateTeamMemberPayload'; + team: Team; + teamMember: Member; }; export type CreatedBy = { @@ -233,118 +109,257 @@ export type CreatedBy = { profileIcon: ProfileIcon; }; -export type TaskComment = { - __typename?: 'TaskComment'; - id: Scalars['ID']; - createdAt: Scalars['Time']; - updatedAt?: Maybe; - message: Scalars['String']; - createdBy: CreatedBy; - pinned: Scalars['Boolean']; +export type DeleteInvitedProjectMember = { + projectID: Scalars['UUID']; + email: Scalars['String']; }; -export type Organization = { - __typename?: 'Organization'; - id: Scalars['ID']; - name: Scalars['String']; +export type DeleteInvitedProjectMemberPayload = { + __typename?: 'DeleteInvitedProjectMemberPayload'; + invitedMember: InvitedMember; }; -export type TaskChecklistItem = { - __typename?: 'TaskChecklistItem'; - id: Scalars['ID']; - name: Scalars['String']; +export type DeleteInvitedUserAccount = { + invitedUserID: Scalars['UUID']; +}; + +export type DeleteInvitedUserAccountPayload = { + __typename?: 'DeleteInvitedUserAccountPayload'; + invitedUser: InvitedUserAccount; +}; + +export type DeleteProject = { + projectID: Scalars['UUID']; +}; + +export type DeleteProjectLabel = { + projectLabelID: Scalars['UUID']; +}; + +export type DeleteProjectMember = { + projectID: Scalars['UUID']; + userID: Scalars['UUID']; +}; + +export type DeleteProjectMemberPayload = { + __typename?: 'DeleteProjectMemberPayload'; + ok: Scalars['Boolean']; + member: Member; + projectID: Scalars['UUID']; +}; + +export type DeleteProjectPayload = { + __typename?: 'DeleteProjectPayload'; + ok: Scalars['Boolean']; + project: Project; +}; + +export type DeleteTaskChecklist = { taskChecklistID: Scalars['UUID']; - complete: Scalars['Boolean']; - position: Scalars['Float']; - dueDate: Scalars['Time']; }; -export type TaskChecklist = { - __typename?: 'TaskChecklist'; +export type DeleteTaskChecklistItem = { + taskChecklistItemID: Scalars['UUID']; +}; + +export type DeleteTaskChecklistItemPayload = { + __typename?: 'DeleteTaskChecklistItemPayload'; + ok: Scalars['Boolean']; + taskChecklistItem: TaskChecklistItem; +}; + +export type DeleteTaskChecklistPayload = { + __typename?: 'DeleteTaskChecklistPayload'; + ok: Scalars['Boolean']; + taskChecklist: TaskChecklist; +}; + +export type DeleteTaskComment = { + commentID: Scalars['UUID']; +}; + +export type DeleteTaskCommentPayload = { + __typename?: 'DeleteTaskCommentPayload'; + taskID: Scalars['UUID']; + commentID: Scalars['UUID']; +}; + +export type DeleteTaskGroupInput = { + taskGroupID: Scalars['UUID']; +}; + +export type DeleteTaskGroupPayload = { + __typename?: 'DeleteTaskGroupPayload'; + ok: Scalars['Boolean']; + affectedRows: Scalars['Int']; + taskGroup: TaskGroup; +}; + +export type DeleteTaskGroupTasks = { + taskGroupID: Scalars['UUID']; +}; + +export type DeleteTaskGroupTasksPayload = { + __typename?: 'DeleteTaskGroupTasksPayload'; + taskGroupID: Scalars['UUID']; + tasks: Array; +}; + +export type DeleteTaskInput = { + taskID: Scalars['UUID']; +}; + +export type DeleteTaskPayload = { + __typename?: 'DeleteTaskPayload'; + taskID: Scalars['UUID']; +}; + +export type DeleteTeam = { + teamID: Scalars['UUID']; +}; + +export type DeleteTeamMember = { + teamID: Scalars['UUID']; + userID: Scalars['UUID']; + newOwnerID?: Maybe; +}; + +export type DeleteTeamMemberPayload = { + __typename?: 'DeleteTeamMemberPayload'; + teamID: Scalars['UUID']; + userID: Scalars['UUID']; + affectedProjects: Array; +}; + +export type DeleteTeamPayload = { + __typename?: 'DeleteTeamPayload'; + ok: Scalars['Boolean']; + team: Team; + projects: Array; +}; + +export type DeleteUserAccount = { + userID: Scalars['UUID']; + newOwnerID?: Maybe; +}; + +export type DeleteUserAccountPayload = { + __typename?: 'DeleteUserAccountPayload'; + ok: Scalars['Boolean']; + userAccount: UserAccount; +}; + +export type DuplicateTaskGroup = { + projectID: Scalars['UUID']; + taskGroupID: Scalars['UUID']; + name: Scalars['String']; + position: Scalars['Float']; +}; + +export type DuplicateTaskGroupPayload = { + __typename?: 'DuplicateTaskGroupPayload'; + taskGroup: TaskGroup; +}; + +export enum EntityType { + Task = 'TASK' +} + +export type FindProject = { + projectID: Scalars['UUID']; +}; + +export type FindTask = { + taskID: Scalars['UUID']; +}; + +export type FindTeam = { + teamID: Scalars['UUID']; +}; + +export type FindUser = { + userID: Scalars['UUID']; +}; + +export type InviteProjectMembers = { + projectID: Scalars['UUID']; + members: Array; +}; + +export type InviteProjectMembersPayload = { + __typename?: 'InviteProjectMembersPayload'; + ok: Scalars['Boolean']; + projectID: Scalars['UUID']; + members: Array; + invitedMembers: Array; +}; + +export type InvitedMember = { + __typename?: 'InvitedMember'; + email: Scalars['String']; + invitedOn: Scalars['Time']; +}; + +export type InvitedUserAccount = { + __typename?: 'InvitedUserAccount'; + id: Scalars['ID']; + email: Scalars['String']; + invitedOn: Scalars['Time']; + member: MemberList; +}; + +export type LabelColor = { + __typename?: 'LabelColor'; id: Scalars['ID']; name: Scalars['String']; position: Scalars['Float']; - items: Array; + colorHex: Scalars['String']; }; -export enum ShareStatus { - Invited = 'INVITED', - Joined = 'JOINED' -} +export type LogoutUser = { + userID: Scalars['UUID']; +}; -export enum RoleLevel { - Admin = 'ADMIN', - Member = 'MEMBER' -} +export type MePayload = { + __typename?: 'MePayload'; + user: UserAccount; + teamRoles: Array; + projectRoles: Array; +}; -export enum ActionLevel { - Org = 'ORG', - Team = 'TEAM', - Project = 'PROJECT' -} +export type Member = { + __typename?: 'Member'; + id: Scalars['ID']; + role: Role; + fullName: Scalars['String']; + username: Scalars['String']; + profileIcon: ProfileIcon; + owned: OwnedList; + member: MemberList; +}; -export enum ObjectType { - Org = 'ORG', - Team = 'TEAM', - Project = 'PROJECT', - Task = 'TASK', - TaskGroup = 'TASK_GROUP', - TaskChecklist = 'TASK_CHECKLIST', - TaskChecklistItem = 'TASK_CHECKLIST_ITEM' -} +export type MemberInvite = { + userID?: Maybe; + email?: Maybe; +}; -export type Query = { - __typename?: 'Query'; - findProject: Project; - findTask: Task; - findTeam: Team; - findUser: UserAccount; - invitedUsers: Array; - labelColors: Array; - me: MePayload; - myTasks: MyTasksPayload; - notifications: Array; - organizations: Array; - projects: Array; - searchMembers: Array; - taskGroups: Array; +export type MemberList = { + __typename?: 'MemberList'; teams: Array; - users: Array; + projects: Array; }; - -export type QueryFindProjectArgs = { - input: FindProject; +export type MemberSearchFilter = { + searchFilter: Scalars['String']; + projectID?: Maybe; }; - -export type QueryFindTaskArgs = { - input: FindTask; -}; - - -export type QueryFindTeamArgs = { - input: FindTeam; -}; - - -export type QueryFindUserArgs = { - input: FindUser; -}; - - -export type QueryMyTasksArgs = { - input: MyTasks; -}; - - -export type QueryProjectsArgs = { - input?: Maybe; -}; - - -export type QuerySearchMembersArgs = { - input: MemberSearchFilter; +export type MemberSearchResult = { + __typename?: 'MemberSearchResult'; + similarity: Scalars['Int']; + id: Scalars['String']; + user?: Maybe; + status: ShareStatus; }; export type Mutation = { @@ -688,6 +703,23 @@ export type MutationUpdateUserRoleArgs = { input: UpdateUserRole; }; +export type MyTasks = { + status: MyTasksStatus; + sort: MyTasksSort; +}; + +export type MyTasksPayload = { + __typename?: 'MyTasksPayload'; + tasks: Array; + projects: Array; +}; + +export enum MyTasksSort { + None = 'NONE', + Project = 'PROJECT', + DueDate = 'DUE_DATE' +} + export enum MyTasksStatus { All = 'ALL', Incomplete = 'INCOMPLETE', @@ -699,79 +731,68 @@ export enum MyTasksStatus { CompleteThreeWeek = 'COMPLETE_THREE_WEEK' } -export enum MyTasksSort { - None = 'NONE', - Project = 'PROJECT', - DueDate = 'DUE_DATE' -} - -export type MyTasks = { - status: MyTasksStatus; - sort: MyTasksSort; -}; - -export type ProjectTaskMapping = { - __typename?: 'ProjectTaskMapping'; - projectID: Scalars['UUID']; - taskID: Scalars['UUID']; -}; - -export type MyTasksPayload = { - __typename?: 'MyTasksPayload'; - tasks: Array; - projects: Array; -}; - -export type TeamRole = { - __typename?: 'TeamRole'; - teamID: Scalars['UUID']; - roleCode: RoleCode; -}; - -export type ProjectRole = { - __typename?: 'ProjectRole'; - projectID: Scalars['UUID']; - roleCode: RoleCode; -}; - -export type MePayload = { - __typename?: 'MePayload'; - user: UserAccount; - teamRoles: Array; - projectRoles: Array; -}; - -export type ProjectsFilter = { +export type NewProject = { teamID?: Maybe; + name: Scalars['String']; }; -export type FindUser = { +export type NewProjectLabel = { + projectID: Scalars['UUID']; + labelColorID: Scalars['UUID']; + name?: Maybe; +}; + +export type NewRefreshToken = { userID: Scalars['UUID']; }; -export type FindProject = { +export type NewTask = { + taskGroupID: Scalars['UUID']; + name: Scalars['String']; + position: Scalars['Float']; + assigned?: Maybe>; +}; + +export type NewTaskGroup = { projectID: Scalars['UUID']; + name: Scalars['String']; + position: Scalars['Float']; }; -export type FindTask = { +export type NewTaskGroupLocation = { + taskGroupID: Scalars['UUID']; + position: Scalars['Float']; +}; + +export type NewTaskLocation = { taskID: Scalars['UUID']; + taskGroupID: Scalars['UUID']; + position: Scalars['Float']; }; -export type FindTeam = { - teamID: Scalars['UUID']; +export type NewTeam = { + name: Scalars['String']; + organizationID: Scalars['UUID']; }; -export enum EntityType { - Task = 'TASK' -} +export type NewUserAccount = { + username: Scalars['String']; + email: Scalars['String']; + fullName: Scalars['String']; + initials: Scalars['String']; + password: Scalars['String']; + roleCode: Scalars['String']; +}; -export enum ActorType { - User = 'USER' -} - -export enum ActionType { - TaskMemberAdded = 'TASK_MEMBER_ADDED' -} +export type Notification = { + __typename?: 'Notification'; + id: Scalars['ID']; + entity: NotificationEntity; + actionType: ActionType; + actor: NotificationActor; + read: Scalars['Boolean']; + createdAt: Scalars['Time']; +}; export type NotificationActor = { __typename?: 'NotificationActor'; @@ -787,49 +808,308 @@ export type NotificationEntity = { name: Scalars['String']; }; -export type Notification = { - __typename?: 'Notification'; +export enum ObjectType { + Org = 'ORG', + Team = 'TEAM', + Project = 'PROJECT', + Task = 'TASK', + TaskGroup = 'TASK_GROUP', + TaskChecklist = 'TASK_CHECKLIST', + TaskChecklistItem = 'TASK_CHECKLIST_ITEM' +} + +export type Organization = { + __typename?: 'Organization'; + id: Scalars['ID']; + name: Scalars['String']; +}; + +export type OwnedList = { + __typename?: 'OwnedList'; + teams: Array; + projects: Array; +}; + +export type OwnersList = { + __typename?: 'OwnersList'; + projects: Array; + teams: Array; +}; + +export type ProfileIcon = { + __typename?: 'ProfileIcon'; + url?: Maybe; + initials?: Maybe; + bgColor?: Maybe; +}; + +export type Project = { + __typename?: 'Project'; id: Scalars['ID']; - entity: NotificationEntity; - actionType: ActionType; - actor: NotificationActor; - read: Scalars['Boolean']; createdAt: Scalars['Time']; -}; - -export type NewProject = { - teamID?: Maybe; name: Scalars['String']; + team?: Maybe; + taskGroups: Array; + members: Array; + invitedMembers: Array; + labels: Array; }; -export type UpdateProjectName = { - projectID: Scalars['UUID']; - name: Scalars['String']; -}; - -export type DeleteProject = { - projectID: Scalars['UUID']; -}; - -export type DeleteProjectPayload = { - __typename?: 'DeleteProjectPayload'; - ok: Scalars['Boolean']; - project: Project; -}; - -export type NewProjectLabel = { - projectID: Scalars['UUID']; - labelColorID: Scalars['UUID']; +export type ProjectLabel = { + __typename?: 'ProjectLabel'; + id: Scalars['ID']; + createdDate: Scalars['Time']; + labelColor: LabelColor; name?: Maybe; }; -export type DeleteProjectLabel = { +export type ProjectRole = { + __typename?: 'ProjectRole'; + projectID: Scalars['UUID']; + roleCode: RoleCode; +}; + +export type ProjectTaskMapping = { + __typename?: 'ProjectTaskMapping'; + projectID: Scalars['UUID']; + taskID: Scalars['UUID']; +}; + +export type ProjectsFilter = { + teamID?: Maybe; +}; + +export type Query = { + __typename?: 'Query'; + findProject: Project; + findTask: Task; + findTeam: Team; + findUser: UserAccount; + invitedUsers: Array; + labelColors: Array; + me: MePayload; + myTasks: MyTasksPayload; + notifications: Array; + organizations: Array; + projects: Array; + searchMembers: Array; + taskGroups: Array; + teams: Array; + users: Array; +}; + + +export type QueryFindProjectArgs = { + input: FindProject; +}; + + +export type QueryFindTaskArgs = { + input: FindTask; +}; + + +export type QueryFindTeamArgs = { + input: FindTeam; +}; + + +export type QueryFindUserArgs = { + input: FindUser; +}; + + +export type QueryMyTasksArgs = { + input: MyTasks; +}; + + +export type QueryProjectsArgs = { + input?: Maybe; +}; + + +export type QuerySearchMembersArgs = { + input: MemberSearchFilter; +}; + +export type RefreshToken = { + __typename?: 'RefreshToken'; + id: Scalars['ID']; + userId: Scalars['UUID']; + expiresAt: Scalars['Time']; + createdAt: Scalars['Time']; +}; + +export type RemoveTaskLabelInput = { + taskID: Scalars['UUID']; + taskLabelID: Scalars['UUID']; +}; + +export type Role = { + __typename?: 'Role'; + code: Scalars['String']; + name: Scalars['String']; +}; + +export enum RoleCode { + Owner = 'owner', + Admin = 'admin', + Member = 'member', + Observer = 'observer' +} + +export enum RoleLevel { + Admin = 'ADMIN', + Member = 'MEMBER' +} + +export type SetTaskChecklistItemComplete = { + taskChecklistItemID: Scalars['UUID']; + complete: Scalars['Boolean']; +}; + +export type SetTaskComplete = { + taskID: Scalars['UUID']; + complete: Scalars['Boolean']; +}; + +export enum ShareStatus { + Invited = 'INVITED', + Joined = 'JOINED' +} + +export type SortTaskGroup = { + taskGroupID: Scalars['UUID']; + tasks: Array; +}; + +export type SortTaskGroupPayload = { + __typename?: 'SortTaskGroupPayload'; + taskGroupID: Scalars['UUID']; + tasks: Array; +}; + +export type Task = { + __typename?: 'Task'; + id: Scalars['ID']; + taskGroup: TaskGroup; + createdAt: Scalars['Time']; + name: Scalars['String']; + position: Scalars['Float']; + description?: Maybe; + dueDate?: Maybe; + hasTime: Scalars['Boolean']; + complete: Scalars['Boolean']; + completedAt?: Maybe; + assigned: Array; + labels: Array; + checklists: Array; + badges: TaskBadges; + activity: Array; + comments: Array; +}; + +export type TaskActivity = { + __typename?: 'TaskActivity'; + id: Scalars['ID']; + type: ActivityType; + data: Array; + causedBy: CausedBy; + createdAt: Scalars['Time']; +}; + +export type TaskActivityData = { + __typename?: 'TaskActivityData'; + name: Scalars['String']; + value: Scalars['String']; +}; + +export type TaskBadges = { + __typename?: 'TaskBadges'; + checklist?: Maybe; +}; + +export type TaskChecklist = { + __typename?: 'TaskChecklist'; + id: Scalars['ID']; + name: Scalars['String']; + position: Scalars['Float']; + items: Array; +}; + +export type TaskChecklistItem = { + __typename?: 'TaskChecklistItem'; + id: Scalars['ID']; + name: Scalars['String']; + taskChecklistID: Scalars['UUID']; + complete: Scalars['Boolean']; + position: Scalars['Float']; + dueDate: Scalars['Time']; +}; + +export type TaskComment = { + __typename?: 'TaskComment'; + id: Scalars['ID']; + createdAt: Scalars['Time']; + updatedAt?: Maybe; + message: Scalars['String']; + createdBy: CreatedBy; + pinned: Scalars['Boolean']; +}; + +export type TaskGroup = { + __typename?: 'TaskGroup'; + id: Scalars['ID']; + projectID: Scalars['String']; + createdAt: Scalars['Time']; + name: Scalars['String']; + position: Scalars['Float']; + tasks: Array; +}; + +export type TaskLabel = { + __typename?: 'TaskLabel'; + id: Scalars['ID']; + projectLabel: ProjectLabel; + assignedDate: Scalars['Time']; +}; + +export type TaskPositionUpdate = { + taskID: Scalars['UUID']; + position: Scalars['Float']; +}; + +export type Team = { + __typename?: 'Team'; + id: Scalars['ID']; + createdAt: Scalars['Time']; + name: Scalars['String']; + members: Array; +}; + +export type TeamRole = { + __typename?: 'TeamRole'; + teamID: Scalars['UUID']; + roleCode: RoleCode; +}; + + +export type ToggleTaskLabelInput = { + taskID: Scalars['UUID']; projectLabelID: Scalars['UUID']; }; -export type UpdateProjectLabelName = { - projectLabelID: Scalars['UUID']; - name: Scalars['String']; +export type ToggleTaskLabelPayload = { + __typename?: 'ToggleTaskLabelPayload'; + active: Scalars['Boolean']; + task: Task; +}; + + +export type UnassignTaskInput = { + taskID: Scalars['UUID']; + userID: Scalars['UUID']; }; export type UpdateProjectLabel = { @@ -843,44 +1123,9 @@ export type UpdateProjectLabelColor = { labelColorID: Scalars['UUID']; }; -export type DeleteInvitedProjectMember = { - projectID: Scalars['UUID']; - email: Scalars['String']; -}; - -export type DeleteInvitedProjectMemberPayload = { - __typename?: 'DeleteInvitedProjectMemberPayload'; - invitedMember: InvitedMember; -}; - -export type MemberInvite = { - userID?: Maybe; - email?: Maybe; -}; - -export type InviteProjectMembers = { - projectID: Scalars['UUID']; - members: Array; -}; - -export type InviteProjectMembersPayload = { - __typename?: 'InviteProjectMembersPayload'; - ok: Scalars['Boolean']; - projectID: Scalars['UUID']; - members: Array; - invitedMembers: Array; -}; - -export type DeleteProjectMember = { - projectID: Scalars['UUID']; - userID: Scalars['UUID']; -}; - -export type DeleteProjectMemberPayload = { - __typename?: 'DeleteProjectMemberPayload'; - ok: Scalars['Boolean']; - member: Member; - projectID: Scalars['UUID']; +export type UpdateProjectLabelName = { + projectLabelID: Scalars['UUID']; + name: Scalars['String']; }; export type UpdateProjectMemberRole = { @@ -895,62 +1140,8 @@ export type UpdateProjectMemberRolePayload = { member: Member; }; -export type NewTask = { - taskGroupID: Scalars['UUID']; - name: Scalars['String']; - position: Scalars['Float']; - assigned?: Maybe>; -}; - -export type AssignTaskInput = { - taskID: Scalars['UUID']; - userID: Scalars['UUID']; -}; - -export type UnassignTaskInput = { - taskID: Scalars['UUID']; - userID: Scalars['UUID']; -}; - -export type UpdateTaskDescriptionInput = { - taskID: Scalars['UUID']; - description: Scalars['String']; -}; - -export type UpdateTaskLocationPayload = { - __typename?: 'UpdateTaskLocationPayload'; - previousTaskGroupID: Scalars['UUID']; - task: Task; -}; - -export type UpdateTaskDueDate = { - taskID: Scalars['UUID']; - hasTime: Scalars['Boolean']; - dueDate?: Maybe; -}; - -export type SetTaskComplete = { - taskID: Scalars['UUID']; - complete: Scalars['Boolean']; -}; - -export type NewTaskLocation = { - taskID: Scalars['UUID']; - taskGroupID: Scalars['UUID']; - position: Scalars['Float']; -}; - -export type DeleteTaskInput = { - taskID: Scalars['UUID']; -}; - -export type DeleteTaskPayload = { - __typename?: 'DeleteTaskPayload'; - taskID: Scalars['UUID']; -}; - -export type UpdateTaskName = { - taskID: Scalars['UUID']; +export type UpdateProjectName = { + projectID: Scalars['UUID']; name: Scalars['String']; }; @@ -967,6 +1158,11 @@ export type UpdateTaskChecklistItemLocationPayload = { checklistItem: TaskChecklistItem; }; +export type UpdateTaskChecklistItemName = { + taskChecklistItemID: Scalars['UUID']; + name: Scalars['String']; +}; + export type UpdateTaskChecklistLocation = { taskChecklistID: Scalars['UUID']; position: Scalars['Float']; @@ -977,64 +1173,11 @@ export type UpdateTaskChecklistLocationPayload = { checklist: TaskChecklist; }; -export type CreateTaskChecklist = { - taskID: Scalars['UUID']; - name: Scalars['String']; - position: Scalars['Float']; -}; - -export type DeleteTaskChecklistItemPayload = { - __typename?: 'DeleteTaskChecklistItemPayload'; - ok: Scalars['Boolean']; - taskChecklistItem: TaskChecklistItem; -}; - -export type CreateTaskChecklistItem = { - taskChecklistID: Scalars['UUID']; - name: Scalars['String']; - position: Scalars['Float']; -}; - -export type SetTaskChecklistItemComplete = { - taskChecklistItemID: Scalars['UUID']; - complete: Scalars['Boolean']; -}; - -export type DeleteTaskChecklistItem = { - taskChecklistItemID: Scalars['UUID']; -}; - -export type UpdateTaskChecklistItemName = { - taskChecklistItemID: Scalars['UUID']; - name: Scalars['String']; -}; - export type UpdateTaskChecklistName = { taskChecklistID: Scalars['UUID']; name: Scalars['String']; }; -export type DeleteTaskChecklist = { - taskChecklistID: Scalars['UUID']; -}; - -export type DeleteTaskChecklistPayload = { - __typename?: 'DeleteTaskChecklistPayload'; - ok: Scalars['Boolean']; - taskChecklist: TaskChecklist; -}; - -export type CreateTaskComment = { - taskID: Scalars['UUID']; - message: Scalars['String']; -}; - -export type CreateTaskCommentPayload = { - __typename?: 'CreateTaskCommentPayload'; - taskID: Scalars['UUID']; - comment: TaskComment; -}; - export type UpdateTaskComment = { commentID: Scalars['UUID']; message: Scalars['String']; @@ -1046,57 +1189,15 @@ export type UpdateTaskCommentPayload = { comment: TaskComment; }; -export type DeleteTaskComment = { - commentID: Scalars['UUID']; -}; - -export type DeleteTaskCommentPayload = { - __typename?: 'DeleteTaskCommentPayload'; +export type UpdateTaskDescriptionInput = { taskID: Scalars['UUID']; - commentID: Scalars['UUID']; + description: Scalars['String']; }; -export type DeleteTaskGroupTasks = { - taskGroupID: Scalars['UUID']; -}; - -export type DeleteTaskGroupTasksPayload = { - __typename?: 'DeleteTaskGroupTasksPayload'; - taskGroupID: Scalars['UUID']; - tasks: Array; -}; - -export type TaskPositionUpdate = { +export type UpdateTaskDueDate = { taskID: Scalars['UUID']; - position: Scalars['Float']; -}; - -export type SortTaskGroupPayload = { - __typename?: 'SortTaskGroupPayload'; - taskGroupID: Scalars['UUID']; - tasks: Array; -}; - -export type SortTaskGroup = { - taskGroupID: Scalars['UUID']; - tasks: Array; -}; - -export type DuplicateTaskGroup = { - projectID: Scalars['UUID']; - taskGroupID: Scalars['UUID']; - name: Scalars['String']; - position: Scalars['Float']; -}; - -export type DuplicateTaskGroupPayload = { - __typename?: 'DuplicateTaskGroupPayload'; - taskGroup: TaskGroup; -}; - -export type NewTaskGroupLocation = { - taskGroupID: Scalars['UUID']; - position: Scalars['Float']; + hasTime: Scalars['Boolean']; + dueDate?: Maybe; }; export type UpdateTaskGroupName = { @@ -1104,82 +1205,15 @@ export type UpdateTaskGroupName = { name: Scalars['String']; }; -export type DeleteTaskGroupInput = { - taskGroupID: Scalars['UUID']; -}; - -export type DeleteTaskGroupPayload = { - __typename?: 'DeleteTaskGroupPayload'; - ok: Scalars['Boolean']; - affectedRows: Scalars['Int']; - taskGroup: TaskGroup; -}; - -export type NewTaskGroup = { - projectID: Scalars['UUID']; - name: Scalars['String']; - position: Scalars['Float']; -}; - -export type AddTaskLabelInput = { - taskID: Scalars['UUID']; - projectLabelID: Scalars['UUID']; -}; - -export type RemoveTaskLabelInput = { - taskID: Scalars['UUID']; - taskLabelID: Scalars['UUID']; -}; - -export type ToggleTaskLabelInput = { - taskID: Scalars['UUID']; - projectLabelID: Scalars['UUID']; -}; - -export type ToggleTaskLabelPayload = { - __typename?: 'ToggleTaskLabelPayload'; - active: Scalars['Boolean']; +export type UpdateTaskLocationPayload = { + __typename?: 'UpdateTaskLocationPayload'; + previousTaskGroupID: Scalars['UUID']; task: Task; }; -export type NewTeam = { +export type UpdateTaskName = { + taskID: Scalars['UUID']; name: Scalars['String']; - organizationID: Scalars['UUID']; -}; - -export type DeleteTeam = { - teamID: Scalars['UUID']; -}; - -export type DeleteTeamPayload = { - __typename?: 'DeleteTeamPayload'; - ok: Scalars['Boolean']; - team: Team; - projects: Array; -}; - -export type DeleteTeamMember = { - teamID: Scalars['UUID']; - userID: Scalars['UUID']; - newOwnerID?: Maybe; -}; - -export type DeleteTeamMemberPayload = { - __typename?: 'DeleteTeamMemberPayload'; - teamID: Scalars['UUID']; - userID: Scalars['UUID']; - affectedProjects: Array; -}; - -export type CreateTeamMember = { - userID: Scalars['UUID']; - teamID: Scalars['UUID']; -}; - -export type CreateTeamMemberPayload = { - __typename?: 'CreateTeamMemberPayload'; - team: Team; - teamMember: Member; }; export type UpdateTeamMemberRole = { @@ -1195,33 +1229,6 @@ export type UpdateTeamMemberRolePayload = { member: Member; }; -export type DeleteInvitedUserAccount = { - invitedUserID: Scalars['UUID']; -}; - -export type DeleteInvitedUserAccountPayload = { - __typename?: 'DeleteInvitedUserAccountPayload'; - invitedUser: InvitedUserAccount; -}; - -export type MemberSearchFilter = { - searchFilter: Scalars['String']; - projectID?: Maybe; -}; - -export type MemberSearchResult = { - __typename?: 'MemberSearchResult'; - similarity: Scalars['Int']; - id: Scalars['String']; - user?: Maybe; - status: ShareStatus; -}; - -export type UpdateUserInfoPayload = { - __typename?: 'UpdateUserInfoPayload'; - user: UserAccount; -}; - export type UpdateUserInfo = { name: Scalars['String']; initials: Scalars['String']; @@ -1229,6 +1236,11 @@ export type UpdateUserInfo = { bio: Scalars['String']; }; +export type UpdateUserInfoPayload = { + __typename?: 'UpdateUserInfoPayload'; + user: UserAccount; +}; + export type UpdateUserPassword = { userID: Scalars['UUID']; password: Scalars['String']; @@ -1250,32 +1262,20 @@ export type UpdateUserRolePayload = { user: UserAccount; }; -export type NewRefreshToken = { - userID: Scalars['UUID']; -}; -export type NewUserAccount = { - username: Scalars['String']; +export type UserAccount = { + __typename?: 'UserAccount'; + id: Scalars['ID']; email: Scalars['String']; + createdAt: Scalars['Time']; fullName: Scalars['String']; initials: Scalars['String']; - password: Scalars['String']; - roleCode: Scalars['String']; -}; - -export type LogoutUser = { - userID: Scalars['UUID']; -}; - -export type DeleteUserAccount = { - userID: Scalars['UUID']; - newOwnerID?: Maybe; -}; - -export type DeleteUserAccountPayload = { - __typename?: 'DeleteUserAccountPayload'; - ok: Scalars['Boolean']; - userAccount: UserAccount; + bio: Scalars['String']; + role: Role; + username: Scalars['String']; + profileIcon: ProfileIcon; + owned: OwnedList; + member: MemberList; }; export type AssignTaskMutationVariables = Exact<{ @@ -1727,7 +1727,7 @@ export type DeleteProjectMemberMutation = ( export type InviteProjectMembersMutationVariables = Exact<{ projectID: Scalars['UUID']; - members: Array; + members: Array | MemberInvite; }>; @@ -1780,7 +1780,7 @@ export type CreateTaskMutationVariables = Exact<{ taskGroupID: Scalars['UUID']; name: Scalars['String']; position: Scalars['Float']; - assigned?: Maybe>; + assigned?: Maybe | Scalars['UUID']>; }>; @@ -2049,7 +2049,7 @@ export type DuplicateTaskGroupMutation = ( ); export type SortTaskGroupMutationVariables = Exact<{ - tasks: Array; + tasks: Array | TaskPositionUpdate; taskGroupID: Scalars['UUID']; }>; @@ -2680,7 +2680,7 @@ export const AssignTaskDocument = gql` } } `; -export type AssignTaskMutationFn = ApolloReactCommon.MutationFunction; +export type AssignTaskMutationFn = Apollo.MutationFunction; /** * __useAssignTaskMutation__ @@ -2700,12 +2700,13 @@ export type AssignTaskMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(AssignTaskDocument, baseOptions); +export function useAssignTaskMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(AssignTaskDocument, options); } export type AssignTaskMutationHookResult = ReturnType; -export type AssignTaskMutationResult = ApolloReactCommon.MutationResult; -export type AssignTaskMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type AssignTaskMutationResult = Apollo.MutationResult; +export type AssignTaskMutationOptions = Apollo.BaseMutationOptions; export const ClearProfileAvatarDocument = gql` mutation clearProfileAvatar { clearProfileAvatar { @@ -2719,7 +2720,7 @@ export const ClearProfileAvatarDocument = gql` } } `; -export type ClearProfileAvatarMutationFn = ApolloReactCommon.MutationFunction; +export type ClearProfileAvatarMutationFn = Apollo.MutationFunction; /** * __useClearProfileAvatarMutation__ @@ -2737,12 +2738,13 @@ export type ClearProfileAvatarMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(ClearProfileAvatarDocument, baseOptions); +export function useClearProfileAvatarMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(ClearProfileAvatarDocument, options); } export type ClearProfileAvatarMutationHookResult = ReturnType; -export type ClearProfileAvatarMutationResult = ApolloReactCommon.MutationResult; -export type ClearProfileAvatarMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type ClearProfileAvatarMutationResult = Apollo.MutationResult; +export type ClearProfileAvatarMutationOptions = Apollo.BaseMutationOptions; export const CreateProjectDocument = gql` mutation createProject($teamID: UUID, $name: String!) { createProject(input: {teamID: $teamID, name: $name}) { @@ -2755,7 +2757,7 @@ export const CreateProjectDocument = gql` } } `; -export type CreateProjectMutationFn = ApolloReactCommon.MutationFunction; +export type CreateProjectMutationFn = Apollo.MutationFunction; /** * __useCreateProjectMutation__ @@ -2775,12 +2777,13 @@ export type CreateProjectMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateProjectDocument, baseOptions); +export function useCreateProjectMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateProjectDocument, options); } export type CreateProjectMutationHookResult = ReturnType; -export type CreateProjectMutationResult = ApolloReactCommon.MutationResult; -export type CreateProjectMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateProjectMutationResult = Apollo.MutationResult; +export type CreateProjectMutationOptions = Apollo.BaseMutationOptions; export const CreateProjectLabelDocument = gql` mutation createProjectLabel($projectID: UUID!, $labelColorID: UUID!, $name: String!) { createProjectLabel( @@ -2798,7 +2801,7 @@ export const CreateProjectLabelDocument = gql` } } `; -export type CreateProjectLabelMutationFn = ApolloReactCommon.MutationFunction; +export type CreateProjectLabelMutationFn = Apollo.MutationFunction; /** * __useCreateProjectLabelMutation__ @@ -2819,12 +2822,13 @@ export type CreateProjectLabelMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateProjectLabelDocument, baseOptions); +export function useCreateProjectLabelMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateProjectLabelDocument, options); } export type CreateProjectLabelMutationHookResult = ReturnType; -export type CreateProjectLabelMutationResult = ApolloReactCommon.MutationResult; -export type CreateProjectLabelMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateProjectLabelMutationResult = Apollo.MutationResult; +export type CreateProjectLabelMutationOptions = Apollo.BaseMutationOptions; export const CreateTaskGroupDocument = gql` mutation createTaskGroup($projectID: UUID!, $name: String!, $position: Float!) { createTaskGroup( @@ -2836,7 +2840,7 @@ export const CreateTaskGroupDocument = gql` } } `; -export type CreateTaskGroupMutationFn = ApolloReactCommon.MutationFunction; +export type CreateTaskGroupMutationFn = Apollo.MutationFunction; /** * __useCreateTaskGroupMutation__ @@ -2857,12 +2861,13 @@ export type CreateTaskGroupMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateTaskGroupDocument, baseOptions); +export function useCreateTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateTaskGroupDocument, options); } export type CreateTaskGroupMutationHookResult = ReturnType; -export type CreateTaskGroupMutationResult = ApolloReactCommon.MutationResult; -export type CreateTaskGroupMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateTaskGroupMutationResult = Apollo.MutationResult; +export type CreateTaskGroupMutationOptions = Apollo.BaseMutationOptions; export const DeleteProjectLabelDocument = gql` mutation deleteProjectLabel($projectLabelID: UUID!) { deleteProjectLabel(input: {projectLabelID: $projectLabelID}) { @@ -2870,7 +2875,7 @@ export const DeleteProjectLabelDocument = gql` } } `; -export type DeleteProjectLabelMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteProjectLabelMutationFn = Apollo.MutationFunction; /** * __useDeleteProjectLabelMutation__ @@ -2889,12 +2894,13 @@ export type DeleteProjectLabelMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteProjectLabelDocument, baseOptions); +export function useDeleteProjectLabelMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteProjectLabelDocument, options); } export type DeleteProjectLabelMutationHookResult = ReturnType; -export type DeleteProjectLabelMutationResult = ApolloReactCommon.MutationResult; -export type DeleteProjectLabelMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteProjectLabelMutationResult = Apollo.MutationResult; +export type DeleteProjectLabelMutationOptions = Apollo.BaseMutationOptions; export const DeleteTaskDocument = gql` mutation deleteTask($taskID: UUID!) { deleteTask(input: {taskID: $taskID}) { @@ -2902,7 +2908,7 @@ export const DeleteTaskDocument = gql` } } `; -export type DeleteTaskMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTaskMutationFn = Apollo.MutationFunction; /** * __useDeleteTaskMutation__ @@ -2921,12 +2927,13 @@ export type DeleteTaskMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteTaskDocument, baseOptions); +export function useDeleteTaskMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTaskDocument, options); } export type DeleteTaskMutationHookResult = ReturnType; -export type DeleteTaskMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTaskMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTaskMutationResult = Apollo.MutationResult; +export type DeleteTaskMutationOptions = Apollo.BaseMutationOptions; export const DeleteTaskGroupDocument = gql` mutation deleteTaskGroup($taskGroupID: UUID!) { deleteTaskGroup(input: {taskGroupID: $taskGroupID}) { @@ -2942,7 +2949,7 @@ export const DeleteTaskGroupDocument = gql` } } `; -export type DeleteTaskGroupMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTaskGroupMutationFn = Apollo.MutationFunction; /** * __useDeleteTaskGroupMutation__ @@ -2961,12 +2968,13 @@ export type DeleteTaskGroupMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteTaskGroupDocument, baseOptions); +export function useDeleteTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTaskGroupDocument, options); } export type DeleteTaskGroupMutationHookResult = ReturnType; -export type DeleteTaskGroupMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTaskGroupMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTaskGroupMutationResult = Apollo.MutationResult; +export type DeleteTaskGroupMutationOptions = Apollo.BaseMutationOptions; export const FindProjectDocument = gql` query findProject($projectID: UUID!) { findProject(input: {projectID: $projectID}) { @@ -3072,15 +3080,17 @@ export const FindProjectDocument = gql` * }, * }); */ -export function useFindProjectQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(FindProjectDocument, baseOptions); +export function useFindProjectQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindProjectDocument, options); } -export function useFindProjectLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(FindProjectDocument, baseOptions); +export function useFindProjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindProjectDocument, options); } export type FindProjectQueryHookResult = ReturnType; export type FindProjectLazyQueryHookResult = ReturnType; -export type FindProjectQueryResult = ApolloReactCommon.QueryResult; +export type FindProjectQueryResult = Apollo.QueryResult; export const FindTaskDocument = gql` query findTask($taskID: UUID!) { findTask(input: {taskID: $taskID}) { @@ -3202,15 +3212,17 @@ export const FindTaskDocument = gql` * }, * }); */ -export function useFindTaskQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(FindTaskDocument, baseOptions); +export function useFindTaskQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindTaskDocument, options); } -export function useFindTaskLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(FindTaskDocument, baseOptions); +export function useFindTaskLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindTaskDocument, options); } export type FindTaskQueryHookResult = ReturnType; export type FindTaskLazyQueryHookResult = ReturnType; -export type FindTaskQueryResult = ApolloReactCommon.QueryResult; +export type FindTaskQueryResult = Apollo.QueryResult; export const GetProjectsDocument = gql` query getProjects { organizations { @@ -3248,15 +3260,17 @@ export const GetProjectsDocument = gql` * }, * }); */ -export function useGetProjectsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(GetProjectsDocument, baseOptions); +export function useGetProjectsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetProjectsDocument, options); } -export function useGetProjectsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(GetProjectsDocument, baseOptions); +export function useGetProjectsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetProjectsDocument, options); } export type GetProjectsQueryHookResult = ReturnType; export type GetProjectsLazyQueryHookResult = ReturnType; -export type GetProjectsQueryResult = ApolloReactCommon.QueryResult; +export type GetProjectsQueryResult = Apollo.QueryResult; export const MeDocument = gql` query me { me { @@ -3299,15 +3313,17 @@ export const MeDocument = gql` * }, * }); */ -export function useMeQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(MeDocument, baseOptions); +export function useMeQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(MeDocument, options); } -export function useMeLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(MeDocument, baseOptions); +export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(MeDocument, options); } export type MeQueryHookResult = ReturnType; export type MeLazyQueryHookResult = ReturnType; -export type MeQueryResult = ApolloReactCommon.QueryResult; +export type MeQueryResult = Apollo.QueryResult; export const MyTasksDocument = gql` query myTasks($status: MyTasksStatus!, $sort: MyTasksSort!) { projects { @@ -3352,15 +3368,17 @@ export const MyTasksDocument = gql` * }, * }); */ -export function useMyTasksQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(MyTasksDocument, baseOptions); +export function useMyTasksQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(MyTasksDocument, options); } -export function useMyTasksLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(MyTasksDocument, baseOptions); +export function useMyTasksLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(MyTasksDocument, options); } export type MyTasksQueryHookResult = ReturnType; export type MyTasksLazyQueryHookResult = ReturnType; -export type MyTasksQueryResult = ApolloReactCommon.QueryResult; +export type MyTasksQueryResult = Apollo.QueryResult; export const DeleteProjectDocument = gql` mutation deleteProject($projectID: UUID!) { deleteProject(input: {projectID: $projectID}) { @@ -3371,7 +3389,7 @@ export const DeleteProjectDocument = gql` } } `; -export type DeleteProjectMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteProjectMutationFn = Apollo.MutationFunction; /** * __useDeleteProjectMutation__ @@ -3390,12 +3408,13 @@ export type DeleteProjectMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteProjectDocument, baseOptions); +export function useDeleteProjectMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteProjectDocument, options); } export type DeleteProjectMutationHookResult = ReturnType; -export type DeleteProjectMutationResult = ApolloReactCommon.MutationResult; -export type DeleteProjectMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteProjectMutationResult = Apollo.MutationResult; +export type DeleteProjectMutationOptions = Apollo.BaseMutationOptions; export const DeleteInvitedProjectMemberDocument = gql` mutation deleteInvitedProjectMember($projectID: UUID!, $email: String!) { deleteInvitedProjectMember(input: {projectID: $projectID, email: $email}) { @@ -3405,7 +3424,7 @@ export const DeleteInvitedProjectMemberDocument = gql` } } `; -export type DeleteInvitedProjectMemberMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteInvitedProjectMemberMutationFn = Apollo.MutationFunction; /** * __useDeleteInvitedProjectMemberMutation__ @@ -3425,12 +3444,13 @@ export type DeleteInvitedProjectMemberMutationFn = ApolloReactCommon.MutationFun * }, * }); */ -export function useDeleteInvitedProjectMemberMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(DeleteInvitedProjectMemberDocument, baseOptions); +export function useDeleteInvitedProjectMemberMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteInvitedProjectMemberDocument, options); } export type DeleteInvitedProjectMemberMutationHookResult = ReturnType; -export type DeleteInvitedProjectMemberMutationResult = ApolloReactCommon.MutationResult; -export type DeleteInvitedProjectMemberMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteInvitedProjectMemberMutationResult = Apollo.MutationResult; +export type DeleteInvitedProjectMemberMutationOptions = Apollo.BaseMutationOptions; export const DeleteProjectMemberDocument = gql` mutation deleteProjectMember($projectID: UUID!, $userID: UUID!) { deleteProjectMember(input: {projectID: $projectID, userID: $userID}) { @@ -3442,7 +3462,7 @@ export const DeleteProjectMemberDocument = gql` } } `; -export type DeleteProjectMemberMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteProjectMemberMutationFn = Apollo.MutationFunction; /** * __useDeleteProjectMemberMutation__ @@ -3462,12 +3482,13 @@ export type DeleteProjectMemberMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteProjectMemberDocument, baseOptions); +export function useDeleteProjectMemberMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteProjectMemberDocument, options); } export type DeleteProjectMemberMutationHookResult = ReturnType; -export type DeleteProjectMemberMutationResult = ApolloReactCommon.MutationResult; -export type DeleteProjectMemberMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteProjectMemberMutationResult = Apollo.MutationResult; +export type DeleteProjectMemberMutationOptions = Apollo.BaseMutationOptions; export const InviteProjectMembersDocument = gql` mutation inviteProjectMembers($projectID: UUID!, $members: [MemberInvite!]!) { inviteProjectMembers(input: {projectID: $projectID, members: $members}) { @@ -3493,7 +3514,7 @@ export const InviteProjectMembersDocument = gql` } } `; -export type InviteProjectMembersMutationFn = ApolloReactCommon.MutationFunction; +export type InviteProjectMembersMutationFn = Apollo.MutationFunction; /** * __useInviteProjectMembersMutation__ @@ -3513,12 +3534,13 @@ export type InviteProjectMembersMutationFn = ApolloReactCommon.MutationFunction< * }, * }); */ -export function useInviteProjectMembersMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(InviteProjectMembersDocument, baseOptions); +export function useInviteProjectMembersMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(InviteProjectMembersDocument, options); } export type InviteProjectMembersMutationHookResult = ReturnType; -export type InviteProjectMembersMutationResult = ApolloReactCommon.MutationResult; -export type InviteProjectMembersMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type InviteProjectMembersMutationResult = Apollo.MutationResult; +export type InviteProjectMembersMutationOptions = Apollo.BaseMutationOptions; export const UpdateProjectMemberRoleDocument = gql` mutation updateProjectMemberRole($projectID: UUID!, $userID: UUID!, $roleCode: RoleCode!) { updateProjectMemberRole( @@ -3535,7 +3557,7 @@ export const UpdateProjectMemberRoleDocument = gql` } } `; -export type UpdateProjectMemberRoleMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateProjectMemberRoleMutationFn = Apollo.MutationFunction; /** * __useUpdateProjectMemberRoleMutation__ @@ -3556,12 +3578,13 @@ export type UpdateProjectMemberRoleMutationFn = ApolloReactCommon.MutationFuncti * }, * }); */ -export function useUpdateProjectMemberRoleMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateProjectMemberRoleDocument, baseOptions); +export function useUpdateProjectMemberRoleMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateProjectMemberRoleDocument, options); } export type UpdateProjectMemberRoleMutationHookResult = ReturnType; -export type UpdateProjectMemberRoleMutationResult = ApolloReactCommon.MutationResult; -export type UpdateProjectMemberRoleMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateProjectMemberRoleMutationResult = Apollo.MutationResult; +export type UpdateProjectMemberRoleMutationOptions = Apollo.BaseMutationOptions; export const CreateTaskDocument = gql` mutation createTask($taskGroupID: UUID!, $name: String!, $position: Float!, $assigned: [UUID!]) { createTask( @@ -3571,7 +3594,7 @@ export const CreateTaskDocument = gql` } } ${TaskFieldsFragmentDoc}`; -export type CreateTaskMutationFn = ApolloReactCommon.MutationFunction; +export type CreateTaskMutationFn = Apollo.MutationFunction; /** * __useCreateTaskMutation__ @@ -3593,12 +3616,13 @@ export type CreateTaskMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateTaskDocument, baseOptions); +export function useCreateTaskMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateTaskDocument, options); } export type CreateTaskMutationHookResult = ReturnType; -export type CreateTaskMutationResult = ApolloReactCommon.MutationResult; -export type CreateTaskMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateTaskMutationResult = Apollo.MutationResult; +export type CreateTaskMutationOptions = Apollo.BaseMutationOptions; export const CreateTaskChecklistDocument = gql` mutation createTaskChecklist($taskID: UUID!, $name: String!, $position: Float!) { createTaskChecklist(input: {taskID: $taskID, name: $name, position: $position}) { @@ -3615,7 +3639,7 @@ export const CreateTaskChecklistDocument = gql` } } `; -export type CreateTaskChecklistMutationFn = ApolloReactCommon.MutationFunction; +export type CreateTaskChecklistMutationFn = Apollo.MutationFunction; /** * __useCreateTaskChecklistMutation__ @@ -3636,12 +3660,13 @@ export type CreateTaskChecklistMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateTaskChecklistDocument, baseOptions); +export function useCreateTaskChecklistMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateTaskChecklistDocument, options); } export type CreateTaskChecklistMutationHookResult = ReturnType; -export type CreateTaskChecklistMutationResult = ApolloReactCommon.MutationResult; -export type CreateTaskChecklistMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateTaskChecklistMutationResult = Apollo.MutationResult; +export type CreateTaskChecklistMutationOptions = Apollo.BaseMutationOptions; export const CreateTaskChecklistItemDocument = gql` mutation createTaskChecklistItem($taskChecklistID: UUID!, $name: String!, $position: Float!) { createTaskChecklistItem( @@ -3655,7 +3680,7 @@ export const CreateTaskChecklistItemDocument = gql` } } `; -export type CreateTaskChecklistItemMutationFn = ApolloReactCommon.MutationFunction; +export type CreateTaskChecklistItemMutationFn = Apollo.MutationFunction; /** * __useCreateTaskChecklistItemMutation__ @@ -3676,12 +3701,13 @@ export type CreateTaskChecklistItemMutationFn = ApolloReactCommon.MutationFuncti * }, * }); */ -export function useCreateTaskChecklistItemMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(CreateTaskChecklistItemDocument, baseOptions); +export function useCreateTaskChecklistItemMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateTaskChecklistItemDocument, options); } export type CreateTaskChecklistItemMutationHookResult = ReturnType; -export type CreateTaskChecklistItemMutationResult = ApolloReactCommon.MutationResult; -export type CreateTaskChecklistItemMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateTaskChecklistItemMutationResult = Apollo.MutationResult; +export type CreateTaskChecklistItemMutationOptions = Apollo.BaseMutationOptions; export const CreateTaskCommentDocument = gql` mutation createTaskComment($taskID: UUID!, $message: String!) { createTaskComment(input: {taskID: $taskID, message: $message}) { @@ -3705,7 +3731,7 @@ export const CreateTaskCommentDocument = gql` } } `; -export type CreateTaskCommentMutationFn = ApolloReactCommon.MutationFunction; +export type CreateTaskCommentMutationFn = Apollo.MutationFunction; /** * __useCreateTaskCommentMutation__ @@ -3725,12 +3751,13 @@ export type CreateTaskCommentMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateTaskCommentDocument, baseOptions); +export function useCreateTaskCommentMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateTaskCommentDocument, options); } export type CreateTaskCommentMutationHookResult = ReturnType; -export type CreateTaskCommentMutationResult = ApolloReactCommon.MutationResult; -export type CreateTaskCommentMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateTaskCommentMutationResult = Apollo.MutationResult; +export type CreateTaskCommentMutationOptions = Apollo.BaseMutationOptions; export const DeleteTaskChecklistDocument = gql` mutation deleteTaskChecklist($taskChecklistID: UUID!) { deleteTaskChecklist(input: {taskChecklistID: $taskChecklistID}) { @@ -3741,7 +3768,7 @@ export const DeleteTaskChecklistDocument = gql` } } `; -export type DeleteTaskChecklistMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTaskChecklistMutationFn = Apollo.MutationFunction; /** * __useDeleteTaskChecklistMutation__ @@ -3760,12 +3787,13 @@ export type DeleteTaskChecklistMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteTaskChecklistDocument, baseOptions); +export function useDeleteTaskChecklistMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTaskChecklistDocument, options); } export type DeleteTaskChecklistMutationHookResult = ReturnType; -export type DeleteTaskChecklistMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTaskChecklistMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTaskChecklistMutationResult = Apollo.MutationResult; +export type DeleteTaskChecklistMutationOptions = Apollo.BaseMutationOptions; export const DeleteTaskChecklistItemDocument = gql` mutation deleteTaskChecklistItem($taskChecklistItemID: UUID!) { deleteTaskChecklistItem(input: {taskChecklistItemID: $taskChecklistItemID}) { @@ -3777,7 +3805,7 @@ export const DeleteTaskChecklistItemDocument = gql` } } `; -export type DeleteTaskChecklistItemMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTaskChecklistItemMutationFn = Apollo.MutationFunction; /** * __useDeleteTaskChecklistItemMutation__ @@ -3796,12 +3824,13 @@ export type DeleteTaskChecklistItemMutationFn = ApolloReactCommon.MutationFuncti * }, * }); */ -export function useDeleteTaskChecklistItemMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(DeleteTaskChecklistItemDocument, baseOptions); +export function useDeleteTaskChecklistItemMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTaskChecklistItemDocument, options); } export type DeleteTaskChecklistItemMutationHookResult = ReturnType; -export type DeleteTaskChecklistItemMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTaskChecklistItemMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTaskChecklistItemMutationResult = Apollo.MutationResult; +export type DeleteTaskChecklistItemMutationOptions = Apollo.BaseMutationOptions; export const DeleteTaskCommentDocument = gql` mutation deleteTaskComment($commentID: UUID!) { deleteTaskComment(input: {commentID: $commentID}) { @@ -3809,7 +3838,7 @@ export const DeleteTaskCommentDocument = gql` } } `; -export type DeleteTaskCommentMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTaskCommentMutationFn = Apollo.MutationFunction; /** * __useDeleteTaskCommentMutation__ @@ -3828,12 +3857,13 @@ export type DeleteTaskCommentMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteTaskCommentDocument, baseOptions); +export function useDeleteTaskCommentMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTaskCommentDocument, options); } export type DeleteTaskCommentMutationHookResult = ReturnType; -export type DeleteTaskCommentMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTaskCommentMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTaskCommentMutationResult = Apollo.MutationResult; +export type DeleteTaskCommentMutationOptions = Apollo.BaseMutationOptions; export const SetTaskChecklistItemCompleteDocument = gql` mutation setTaskChecklistItemComplete($taskChecklistItemID: UUID!, $complete: Boolean!) { setTaskChecklistItemComplete( @@ -3844,7 +3874,7 @@ export const SetTaskChecklistItemCompleteDocument = gql` } } `; -export type SetTaskChecklistItemCompleteMutationFn = ApolloReactCommon.MutationFunction; +export type SetTaskChecklistItemCompleteMutationFn = Apollo.MutationFunction; /** * __useSetTaskChecklistItemCompleteMutation__ @@ -3864,12 +3894,13 @@ export type SetTaskChecklistItemCompleteMutationFn = ApolloReactCommon.MutationF * }, * }); */ -export function useSetTaskChecklistItemCompleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(SetTaskChecklistItemCompleteDocument, baseOptions); +export function useSetTaskChecklistItemCompleteMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(SetTaskChecklistItemCompleteDocument, options); } export type SetTaskChecklistItemCompleteMutationHookResult = ReturnType; -export type SetTaskChecklistItemCompleteMutationResult = ApolloReactCommon.MutationResult; -export type SetTaskChecklistItemCompleteMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type SetTaskChecklistItemCompleteMutationResult = Apollo.MutationResult; +export type SetTaskChecklistItemCompleteMutationOptions = Apollo.BaseMutationOptions; export const SetTaskCompleteDocument = gql` mutation setTaskComplete($taskID: UUID!, $complete: Boolean!) { setTaskComplete(input: {taskID: $taskID, complete: $complete}) { @@ -3877,7 +3908,7 @@ export const SetTaskCompleteDocument = gql` } } ${TaskFieldsFragmentDoc}`; -export type SetTaskCompleteMutationFn = ApolloReactCommon.MutationFunction; +export type SetTaskCompleteMutationFn = Apollo.MutationFunction; /** * __useSetTaskCompleteMutation__ @@ -3897,12 +3928,13 @@ export type SetTaskCompleteMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(SetTaskCompleteDocument, baseOptions); +export function useSetTaskCompleteMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(SetTaskCompleteDocument, options); } export type SetTaskCompleteMutationHookResult = ReturnType; -export type SetTaskCompleteMutationResult = ApolloReactCommon.MutationResult; -export type SetTaskCompleteMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type SetTaskCompleteMutationResult = Apollo.MutationResult; +export type SetTaskCompleteMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskChecklistItemLocationDocument = gql` mutation updateTaskChecklistItemLocation($taskChecklistID: UUID!, $taskChecklistItemID: UUID!, $position: Float!) { updateTaskChecklistItemLocation( @@ -3918,7 +3950,7 @@ export const UpdateTaskChecklistItemLocationDocument = gql` } } `; -export type UpdateTaskChecklistItemLocationMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskChecklistItemLocationMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskChecklistItemLocationMutation__ @@ -3939,12 +3971,13 @@ export type UpdateTaskChecklistItemLocationMutationFn = ApolloReactCommon.Mutati * }, * }); */ -export function useUpdateTaskChecklistItemLocationMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateTaskChecklistItemLocationDocument, baseOptions); +export function useUpdateTaskChecklistItemLocationMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskChecklistItemLocationDocument, options); } export type UpdateTaskChecklistItemLocationMutationHookResult = ReturnType; -export type UpdateTaskChecklistItemLocationMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskChecklistItemLocationMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskChecklistItemLocationMutationResult = Apollo.MutationResult; +export type UpdateTaskChecklistItemLocationMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskChecklistItemNameDocument = gql` mutation updateTaskChecklistItemName($taskChecklistItemID: UUID!, $name: String!) { updateTaskChecklistItemName( @@ -3955,7 +3988,7 @@ export const UpdateTaskChecklistItemNameDocument = gql` } } `; -export type UpdateTaskChecklistItemNameMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskChecklistItemNameMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskChecklistItemNameMutation__ @@ -3975,12 +4008,13 @@ export type UpdateTaskChecklistItemNameMutationFn = ApolloReactCommon.MutationFu * }, * }); */ -export function useUpdateTaskChecklistItemNameMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateTaskChecklistItemNameDocument, baseOptions); +export function useUpdateTaskChecklistItemNameMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskChecklistItemNameDocument, options); } export type UpdateTaskChecklistItemNameMutationHookResult = ReturnType; -export type UpdateTaskChecklistItemNameMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskChecklistItemNameMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskChecklistItemNameMutationResult = Apollo.MutationResult; +export type UpdateTaskChecklistItemNameMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskChecklistLocationDocument = gql` mutation updateTaskChecklistLocation($taskChecklistID: UUID!, $position: Float!) { updateTaskChecklistLocation( @@ -3993,7 +4027,7 @@ export const UpdateTaskChecklistLocationDocument = gql` } } `; -export type UpdateTaskChecklistLocationMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskChecklistLocationMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskChecklistLocationMutation__ @@ -4013,12 +4047,13 @@ export type UpdateTaskChecklistLocationMutationFn = ApolloReactCommon.MutationFu * }, * }); */ -export function useUpdateTaskChecklistLocationMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateTaskChecklistLocationDocument, baseOptions); +export function useUpdateTaskChecklistLocationMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskChecklistLocationDocument, options); } export type UpdateTaskChecklistLocationMutationHookResult = ReturnType; -export type UpdateTaskChecklistLocationMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskChecklistLocationMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskChecklistLocationMutationResult = Apollo.MutationResult; +export type UpdateTaskChecklistLocationMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskChecklistNameDocument = gql` mutation updateTaskChecklistName($taskChecklistID: UUID!, $name: String!) { updateTaskChecklistName(input: {taskChecklistID: $taskChecklistID, name: $name}) { @@ -4035,7 +4070,7 @@ export const UpdateTaskChecklistNameDocument = gql` } } `; -export type UpdateTaskChecklistNameMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskChecklistNameMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskChecklistNameMutation__ @@ -4055,12 +4090,13 @@ export type UpdateTaskChecklistNameMutationFn = ApolloReactCommon.MutationFuncti * }, * }); */ -export function useUpdateTaskChecklistNameMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateTaskChecklistNameDocument, baseOptions); +export function useUpdateTaskChecklistNameMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskChecklistNameDocument, options); } export type UpdateTaskChecklistNameMutationHookResult = ReturnType; -export type UpdateTaskChecklistNameMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskChecklistNameMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskChecklistNameMutationResult = Apollo.MutationResult; +export type UpdateTaskChecklistNameMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskCommentDocument = gql` mutation updateTaskComment($commentID: UUID!, $message: String!) { updateTaskComment(input: {commentID: $commentID, message: $message}) { @@ -4072,7 +4108,7 @@ export const UpdateTaskCommentDocument = gql` } } `; -export type UpdateTaskCommentMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskCommentMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskCommentMutation__ @@ -4092,12 +4128,13 @@ export type UpdateTaskCommentMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateTaskCommentDocument, baseOptions); +export function useUpdateTaskCommentMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskCommentDocument, options); } export type UpdateTaskCommentMutationHookResult = ReturnType; -export type UpdateTaskCommentMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskCommentMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskCommentMutationResult = Apollo.MutationResult; +export type UpdateTaskCommentMutationOptions = Apollo.BaseMutationOptions; export const DeleteTaskGroupTasksDocument = gql` mutation deleteTaskGroupTasks($taskGroupID: UUID!) { deleteTaskGroupTasks(input: {taskGroupID: $taskGroupID}) { @@ -4106,7 +4143,7 @@ export const DeleteTaskGroupTasksDocument = gql` } } `; -export type DeleteTaskGroupTasksMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTaskGroupTasksMutationFn = Apollo.MutationFunction; /** * __useDeleteTaskGroupTasksMutation__ @@ -4125,12 +4162,13 @@ export type DeleteTaskGroupTasksMutationFn = ApolloReactCommon.MutationFunction< * }, * }); */ -export function useDeleteTaskGroupTasksMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(DeleteTaskGroupTasksDocument, baseOptions); +export function useDeleteTaskGroupTasksMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTaskGroupTasksDocument, options); } export type DeleteTaskGroupTasksMutationHookResult = ReturnType; -export type DeleteTaskGroupTasksMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTaskGroupTasksMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTaskGroupTasksMutationResult = Apollo.MutationResult; +export type DeleteTaskGroupTasksMutationOptions = Apollo.BaseMutationOptions; export const DuplicateTaskGroupDocument = gql` mutation duplicateTaskGroup($taskGroupID: UUID!, $name: String!, $position: Float!, $projectID: UUID!) { duplicateTaskGroup( @@ -4147,7 +4185,7 @@ export const DuplicateTaskGroupDocument = gql` } } ${TaskFieldsFragmentDoc}`; -export type DuplicateTaskGroupMutationFn = ApolloReactCommon.MutationFunction; +export type DuplicateTaskGroupMutationFn = Apollo.MutationFunction; /** * __useDuplicateTaskGroupMutation__ @@ -4169,12 +4207,13 @@ export type DuplicateTaskGroupMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DuplicateTaskGroupDocument, baseOptions); +export function useDuplicateTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DuplicateTaskGroupDocument, options); } export type DuplicateTaskGroupMutationHookResult = ReturnType; -export type DuplicateTaskGroupMutationResult = ApolloReactCommon.MutationResult; -export type DuplicateTaskGroupMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DuplicateTaskGroupMutationResult = Apollo.MutationResult; +export type DuplicateTaskGroupMutationOptions = Apollo.BaseMutationOptions; export const SortTaskGroupDocument = gql` mutation sortTaskGroup($tasks: [TaskPositionUpdate!]!, $taskGroupID: UUID!) { sortTaskGroup(input: {taskGroupID: $taskGroupID, tasks: $tasks}) { @@ -4186,7 +4225,7 @@ export const SortTaskGroupDocument = gql` } } `; -export type SortTaskGroupMutationFn = ApolloReactCommon.MutationFunction; +export type SortTaskGroupMutationFn = Apollo.MutationFunction; /** * __useSortTaskGroupMutation__ @@ -4206,12 +4245,13 @@ export type SortTaskGroupMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(SortTaskGroupDocument, baseOptions); +export function useSortTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(SortTaskGroupDocument, options); } export type SortTaskGroupMutationHookResult = ReturnType; -export type SortTaskGroupMutationResult = ApolloReactCommon.MutationResult; -export type SortTaskGroupMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type SortTaskGroupMutationResult = Apollo.MutationResult; +export type SortTaskGroupMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskGroupNameDocument = gql` mutation updateTaskGroupName($taskGroupID: UUID!, $name: String!) { updateTaskGroupName(input: {taskGroupID: $taskGroupID, name: $name}) { @@ -4220,7 +4260,7 @@ export const UpdateTaskGroupNameDocument = gql` } } `; -export type UpdateTaskGroupNameMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskGroupNameMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskGroupNameMutation__ @@ -4240,12 +4280,13 @@ export type UpdateTaskGroupNameMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateTaskGroupNameDocument, baseOptions); +export function useUpdateTaskGroupNameMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskGroupNameDocument, options); } export type UpdateTaskGroupNameMutationHookResult = ReturnType; -export type UpdateTaskGroupNameMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskGroupNameMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskGroupNameMutationResult = Apollo.MutationResult; +export type UpdateTaskGroupNameMutationOptions = Apollo.BaseMutationOptions; export const CreateTeamDocument = gql` mutation createTeam($name: String!, $organizationID: UUID!) { createTeam(input: {name: $name, organizationID: $organizationID}) { @@ -4255,7 +4296,7 @@ export const CreateTeamDocument = gql` } } `; -export type CreateTeamMutationFn = ApolloReactCommon.MutationFunction; +export type CreateTeamMutationFn = Apollo.MutationFunction; /** * __useCreateTeamMutation__ @@ -4275,12 +4316,13 @@ export type CreateTeamMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateTeamDocument, baseOptions); +export function useCreateTeamMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateTeamDocument, options); } export type CreateTeamMutationHookResult = ReturnType; -export type CreateTeamMutationResult = ApolloReactCommon.MutationResult; -export type CreateTeamMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateTeamMutationResult = Apollo.MutationResult; +export type CreateTeamMutationOptions = Apollo.BaseMutationOptions; export const CreateTeamMemberDocument = gql` mutation createTeamMember($userID: UUID!, $teamID: UUID!) { createTeamMember(input: {userID: $userID, teamID: $teamID}) { @@ -4304,7 +4346,7 @@ export const CreateTeamMemberDocument = gql` } } `; -export type CreateTeamMemberMutationFn = ApolloReactCommon.MutationFunction; +export type CreateTeamMemberMutationFn = Apollo.MutationFunction; /** * __useCreateTeamMemberMutation__ @@ -4324,12 +4366,13 @@ export type CreateTeamMemberMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateTeamMemberDocument, baseOptions); +export function useCreateTeamMemberMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateTeamMemberDocument, options); } export type CreateTeamMemberMutationHookResult = ReturnType; -export type CreateTeamMemberMutationResult = ApolloReactCommon.MutationResult; -export type CreateTeamMemberMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateTeamMemberMutationResult = Apollo.MutationResult; +export type CreateTeamMemberMutationOptions = Apollo.BaseMutationOptions; export const DeleteTeamDocument = gql` mutation deleteTeam($teamID: UUID!) { deleteTeam(input: {teamID: $teamID}) { @@ -4340,7 +4383,7 @@ export const DeleteTeamDocument = gql` } } `; -export type DeleteTeamMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTeamMutationFn = Apollo.MutationFunction; /** * __useDeleteTeamMutation__ @@ -4359,12 +4402,13 @@ export type DeleteTeamMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteTeamDocument, baseOptions); +export function useDeleteTeamMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTeamDocument, options); } export type DeleteTeamMutationHookResult = ReturnType; -export type DeleteTeamMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTeamMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTeamMutationResult = Apollo.MutationResult; +export type DeleteTeamMutationOptions = Apollo.BaseMutationOptions; export const DeleteTeamMemberDocument = gql` mutation deleteTeamMember($teamID: UUID!, $userID: UUID!, $newOwnerID: UUID) { deleteTeamMember( @@ -4375,7 +4419,7 @@ export const DeleteTeamMemberDocument = gql` } } `; -export type DeleteTeamMemberMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteTeamMemberMutationFn = Apollo.MutationFunction; /** * __useDeleteTeamMemberMutation__ @@ -4396,12 +4440,13 @@ export type DeleteTeamMemberMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteTeamMemberDocument, baseOptions); +export function useDeleteTeamMemberMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteTeamMemberDocument, options); } export type DeleteTeamMemberMutationHookResult = ReturnType; -export type DeleteTeamMemberMutationResult = ApolloReactCommon.MutationResult; -export type DeleteTeamMemberMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteTeamMemberMutationResult = Apollo.MutationResult; +export type DeleteTeamMemberMutationOptions = Apollo.BaseMutationOptions; export const GetTeamDocument = gql` query getTeam($teamID: UUID!) { findTeam(input: {teamID: $teamID}) { @@ -4505,15 +4550,17 @@ export const GetTeamDocument = gql` * }, * }); */ -export function useGetTeamQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(GetTeamDocument, baseOptions); +export function useGetTeamQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetTeamDocument, options); } -export function useGetTeamLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(GetTeamDocument, baseOptions); +export function useGetTeamLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetTeamDocument, options); } export type GetTeamQueryHookResult = ReturnType; export type GetTeamLazyQueryHookResult = ReturnType; -export type GetTeamQueryResult = ApolloReactCommon.QueryResult; +export type GetTeamQueryResult = Apollo.QueryResult; export const UpdateTeamMemberRoleDocument = gql` mutation updateTeamMemberRole($teamID: UUID!, $userID: UUID!, $roleCode: RoleCode!) { updateTeamMemberRole( @@ -4530,7 +4577,7 @@ export const UpdateTeamMemberRoleDocument = gql` } } `; -export type UpdateTeamMemberRoleMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTeamMemberRoleMutationFn = Apollo.MutationFunction; /** * __useUpdateTeamMemberRoleMutation__ @@ -4551,12 +4598,13 @@ export type UpdateTeamMemberRoleMutationFn = ApolloReactCommon.MutationFunction< * }, * }); */ -export function useUpdateTeamMemberRoleMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateTeamMemberRoleDocument, baseOptions); +export function useUpdateTeamMemberRoleMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTeamMemberRoleDocument, options); } export type UpdateTeamMemberRoleMutationHookResult = ReturnType; -export type UpdateTeamMemberRoleMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTeamMemberRoleMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTeamMemberRoleMutationResult = Apollo.MutationResult; +export type UpdateTeamMemberRoleMutationOptions = Apollo.BaseMutationOptions; export const ToggleTaskLabelDocument = gql` mutation toggleTaskLabel($taskID: UUID!, $projectLabelID: UUID!) { toggleTaskLabel(input: {taskID: $taskID, projectLabelID: $projectLabelID}) { @@ -4582,7 +4630,7 @@ export const ToggleTaskLabelDocument = gql` } } `; -export type ToggleTaskLabelMutationFn = ApolloReactCommon.MutationFunction; +export type ToggleTaskLabelMutationFn = Apollo.MutationFunction; /** * __useToggleTaskLabelMutation__ @@ -4602,12 +4650,13 @@ export type ToggleTaskLabelMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(ToggleTaskLabelDocument, baseOptions); +export function useToggleTaskLabelMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(ToggleTaskLabelDocument, options); } export type ToggleTaskLabelMutationHookResult = ReturnType; -export type ToggleTaskLabelMutationResult = ApolloReactCommon.MutationResult; -export type ToggleTaskLabelMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type ToggleTaskLabelMutationResult = Apollo.MutationResult; +export type ToggleTaskLabelMutationOptions = Apollo.BaseMutationOptions; export const TopNavbarDocument = gql` query topNavbar { notifications { @@ -4663,15 +4712,17 @@ export const TopNavbarDocument = gql` * }, * }); */ -export function useTopNavbarQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(TopNavbarDocument, baseOptions); +export function useTopNavbarQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(TopNavbarDocument, options); } -export function useTopNavbarLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(TopNavbarDocument, baseOptions); +export function useTopNavbarLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(TopNavbarDocument, options); } export type TopNavbarQueryHookResult = ReturnType; export type TopNavbarLazyQueryHookResult = ReturnType; -export type TopNavbarQueryResult = ApolloReactCommon.QueryResult; +export type TopNavbarQueryResult = Apollo.QueryResult; export const UnassignTaskDocument = gql` mutation unassignTask($taskID: UUID!, $userID: UUID!) { unassignTask(input: {taskID: $taskID, userID: $userID}) { @@ -4683,7 +4734,7 @@ export const UnassignTaskDocument = gql` } } `; -export type UnassignTaskMutationFn = ApolloReactCommon.MutationFunction; +export type UnassignTaskMutationFn = Apollo.MutationFunction; /** * __useUnassignTaskMutation__ @@ -4703,12 +4754,13 @@ export type UnassignTaskMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UnassignTaskDocument, baseOptions); +export function useUnassignTaskMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UnassignTaskDocument, options); } export type UnassignTaskMutationHookResult = ReturnType; -export type UnassignTaskMutationResult = ApolloReactCommon.MutationResult; -export type UnassignTaskMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UnassignTaskMutationResult = Apollo.MutationResult; +export type UnassignTaskMutationOptions = Apollo.BaseMutationOptions; export const UpdateProjectLabelDocument = gql` mutation updateProjectLabel($projectLabelID: UUID!, $labelColorID: UUID!, $name: String!) { updateProjectLabel( @@ -4726,7 +4778,7 @@ export const UpdateProjectLabelDocument = gql` } } `; -export type UpdateProjectLabelMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateProjectLabelMutationFn = Apollo.MutationFunction; /** * __useUpdateProjectLabelMutation__ @@ -4747,12 +4799,13 @@ export type UpdateProjectLabelMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateProjectLabelDocument, baseOptions); +export function useUpdateProjectLabelMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateProjectLabelDocument, options); } export type UpdateProjectLabelMutationHookResult = ReturnType; -export type UpdateProjectLabelMutationResult = ApolloReactCommon.MutationResult; -export type UpdateProjectLabelMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateProjectLabelMutationResult = Apollo.MutationResult; +export type UpdateProjectLabelMutationOptions = Apollo.BaseMutationOptions; export const UpdateProjectNameDocument = gql` mutation updateProjectName($projectID: UUID!, $name: String!) { updateProjectName(input: {projectID: $projectID, name: $name}) { @@ -4761,7 +4814,7 @@ export const UpdateProjectNameDocument = gql` } } `; -export type UpdateProjectNameMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateProjectNameMutationFn = Apollo.MutationFunction; /** * __useUpdateProjectNameMutation__ @@ -4781,12 +4834,13 @@ export type UpdateProjectNameMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateProjectNameDocument, baseOptions); +export function useUpdateProjectNameMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateProjectNameDocument, options); } export type UpdateProjectNameMutationHookResult = ReturnType; -export type UpdateProjectNameMutationResult = ApolloReactCommon.MutationResult; -export type UpdateProjectNameMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateProjectNameMutationResult = Apollo.MutationResult; +export type UpdateProjectNameMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskDescriptionDocument = gql` mutation updateTaskDescription($taskID: UUID!, $description: String!) { updateTaskDescription(input: {taskID: $taskID, description: $description}) { @@ -4795,7 +4849,7 @@ export const UpdateTaskDescriptionDocument = gql` } } `; -export type UpdateTaskDescriptionMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskDescriptionMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskDescriptionMutation__ @@ -4815,12 +4869,13 @@ export type UpdateTaskDescriptionMutationFn = ApolloReactCommon.MutationFunction * }, * }); */ -export function useUpdateTaskDescriptionMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateTaskDescriptionDocument, baseOptions); +export function useUpdateTaskDescriptionMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskDescriptionDocument, options); } export type UpdateTaskDescriptionMutationHookResult = ReturnType; -export type UpdateTaskDescriptionMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskDescriptionMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskDescriptionMutationResult = Apollo.MutationResult; +export type UpdateTaskDescriptionMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskDueDateDocument = gql` mutation updateTaskDueDate($taskID: UUID!, $dueDate: Time, $hasTime: Boolean!) { updateTaskDueDate( @@ -4832,7 +4887,7 @@ export const UpdateTaskDueDateDocument = gql` } } `; -export type UpdateTaskDueDateMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskDueDateMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskDueDateMutation__ @@ -4853,12 +4908,13 @@ export type UpdateTaskDueDateMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateTaskDueDateDocument, baseOptions); +export function useUpdateTaskDueDateMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskDueDateDocument, options); } export type UpdateTaskDueDateMutationHookResult = ReturnType; -export type UpdateTaskDueDateMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskDueDateMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskDueDateMutationResult = Apollo.MutationResult; +export type UpdateTaskDueDateMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskGroupLocationDocument = gql` mutation updateTaskGroupLocation($taskGroupID: UUID!, $position: Float!) { updateTaskGroupLocation(input: {taskGroupID: $taskGroupID, position: $position}) { @@ -4867,7 +4923,7 @@ export const UpdateTaskGroupLocationDocument = gql` } } `; -export type UpdateTaskGroupLocationMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskGroupLocationMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskGroupLocationMutation__ @@ -4887,12 +4943,13 @@ export type UpdateTaskGroupLocationMutationFn = ApolloReactCommon.MutationFuncti * }, * }); */ -export function useUpdateTaskGroupLocationMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(UpdateTaskGroupLocationDocument, baseOptions); +export function useUpdateTaskGroupLocationMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskGroupLocationDocument, options); } export type UpdateTaskGroupLocationMutationHookResult = ReturnType; -export type UpdateTaskGroupLocationMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskGroupLocationMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskGroupLocationMutationResult = Apollo.MutationResult; +export type UpdateTaskGroupLocationMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskLocationDocument = gql` mutation updateTaskLocation($taskID: UUID!, $taskGroupID: UUID!, $position: Float!) { updateTaskLocation( @@ -4911,7 +4968,7 @@ export const UpdateTaskLocationDocument = gql` } } `; -export type UpdateTaskLocationMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskLocationMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskLocationMutation__ @@ -4932,12 +4989,13 @@ export type UpdateTaskLocationMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateTaskLocationDocument, baseOptions); +export function useUpdateTaskLocationMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskLocationDocument, options); } export type UpdateTaskLocationMutationHookResult = ReturnType; -export type UpdateTaskLocationMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskLocationMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskLocationMutationResult = Apollo.MutationResult; +export type UpdateTaskLocationMutationOptions = Apollo.BaseMutationOptions; export const UpdateTaskNameDocument = gql` mutation updateTaskName($taskID: UUID!, $name: String!) { updateTaskName(input: {taskID: $taskID, name: $name}) { @@ -4947,7 +5005,7 @@ export const UpdateTaskNameDocument = gql` } } `; -export type UpdateTaskNameMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateTaskNameMutationFn = Apollo.MutationFunction; /** * __useUpdateTaskNameMutation__ @@ -4967,12 +5025,13 @@ export type UpdateTaskNameMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateTaskNameDocument, baseOptions); +export function useUpdateTaskNameMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateTaskNameDocument, options); } export type UpdateTaskNameMutationHookResult = ReturnType; -export type UpdateTaskNameMutationResult = ApolloReactCommon.MutationResult; -export type UpdateTaskNameMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateTaskNameMutationResult = Apollo.MutationResult; +export type UpdateTaskNameMutationOptions = Apollo.BaseMutationOptions; export const CreateUserAccountDocument = gql` mutation createUserAccount($username: String!, $roleCode: String!, $email: String!, $fullName: String!, $initials: String!, $password: String!) { createUserAccount( @@ -5016,7 +5075,7 @@ export const CreateUserAccountDocument = gql` } } `; -export type CreateUserAccountMutationFn = ApolloReactCommon.MutationFunction; +export type CreateUserAccountMutationFn = Apollo.MutationFunction; /** * __useCreateUserAccountMutation__ @@ -5040,12 +5099,13 @@ export type CreateUserAccountMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(CreateUserAccountDocument, baseOptions); +export function useCreateUserAccountMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateUserAccountDocument, options); } export type CreateUserAccountMutationHookResult = ReturnType; -export type CreateUserAccountMutationResult = ApolloReactCommon.MutationResult; -export type CreateUserAccountMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type CreateUserAccountMutationResult = Apollo.MutationResult; +export type CreateUserAccountMutationOptions = Apollo.BaseMutationOptions; export const DeleteInvitedUserAccountDocument = gql` mutation deleteInvitedUserAccount($invitedUserID: UUID!) { deleteInvitedUserAccount(input: {invitedUserID: $invitedUserID}) { @@ -5055,7 +5115,7 @@ export const DeleteInvitedUserAccountDocument = gql` } } `; -export type DeleteInvitedUserAccountMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteInvitedUserAccountMutationFn = Apollo.MutationFunction; /** * __useDeleteInvitedUserAccountMutation__ @@ -5074,12 +5134,13 @@ export type DeleteInvitedUserAccountMutationFn = ApolloReactCommon.MutationFunct * }, * }); */ -export function useDeleteInvitedUserAccountMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { - return ApolloReactHooks.useMutation(DeleteInvitedUserAccountDocument, baseOptions); +export function useDeleteInvitedUserAccountMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteInvitedUserAccountDocument, options); } export type DeleteInvitedUserAccountMutationHookResult = ReturnType; -export type DeleteInvitedUserAccountMutationResult = ApolloReactCommon.MutationResult; -export type DeleteInvitedUserAccountMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteInvitedUserAccountMutationResult = Apollo.MutationResult; +export type DeleteInvitedUserAccountMutationOptions = Apollo.BaseMutationOptions; export const DeleteUserAccountDocument = gql` mutation deleteUserAccount($userID: UUID!, $newOwnerID: UUID) { deleteUserAccount(input: {userID: $userID, newOwnerID: $newOwnerID}) { @@ -5090,7 +5151,7 @@ export const DeleteUserAccountDocument = gql` } } `; -export type DeleteUserAccountMutationFn = ApolloReactCommon.MutationFunction; +export type DeleteUserAccountMutationFn = Apollo.MutationFunction; /** * __useDeleteUserAccountMutation__ @@ -5110,12 +5171,13 @@ export type DeleteUserAccountMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(DeleteUserAccountDocument, baseOptions); +export function useDeleteUserAccountMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteUserAccountDocument, options); } export type DeleteUserAccountMutationHookResult = ReturnType; -export type DeleteUserAccountMutationResult = ApolloReactCommon.MutationResult; -export type DeleteUserAccountMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type DeleteUserAccountMutationResult = Apollo.MutationResult; +export type DeleteUserAccountMutationOptions = Apollo.BaseMutationOptions; export const UpdateUserInfoDocument = gql` mutation updateUserInfo($name: String!, $initials: String!, $email: String!, $bio: String!) { updateUserInfo( @@ -5133,7 +5195,7 @@ export const UpdateUserInfoDocument = gql` } } `; -export type UpdateUserInfoMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateUserInfoMutationFn = Apollo.MutationFunction; /** * __useUpdateUserInfoMutation__ @@ -5155,12 +5217,13 @@ export type UpdateUserInfoMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateUserInfoDocument, baseOptions); +export function useUpdateUserInfoMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateUserInfoDocument, options); } export type UpdateUserInfoMutationHookResult = ReturnType; -export type UpdateUserInfoMutationResult = ApolloReactCommon.MutationResult; -export type UpdateUserInfoMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateUserInfoMutationResult = Apollo.MutationResult; +export type UpdateUserInfoMutationOptions = Apollo.BaseMutationOptions; export const UpdateUserPasswordDocument = gql` mutation updateUserPassword($userID: UUID!, $password: String!) { updateUserPassword(input: {userID: $userID, password: $password}) { @@ -5168,7 +5231,7 @@ export const UpdateUserPasswordDocument = gql` } } `; -export type UpdateUserPasswordMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateUserPasswordMutationFn = Apollo.MutationFunction; /** * __useUpdateUserPasswordMutation__ @@ -5188,12 +5251,13 @@ export type UpdateUserPasswordMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateUserPasswordDocument, baseOptions); +export function useUpdateUserPasswordMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateUserPasswordDocument, options); } export type UpdateUserPasswordMutationHookResult = ReturnType; -export type UpdateUserPasswordMutationResult = ApolloReactCommon.MutationResult; -export type UpdateUserPasswordMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateUserPasswordMutationResult = Apollo.MutationResult; +export type UpdateUserPasswordMutationOptions = Apollo.BaseMutationOptions; export const UpdateUserRoleDocument = gql` mutation updateUserRole($userID: UUID!, $roleCode: RoleCode!) { updateUserRole(input: {userID: $userID, roleCode: $roleCode}) { @@ -5207,7 +5271,7 @@ export const UpdateUserRoleDocument = gql` } } `; -export type UpdateUserRoleMutationFn = ApolloReactCommon.MutationFunction; +export type UpdateUserRoleMutationFn = Apollo.MutationFunction; /** * __useUpdateUserRoleMutation__ @@ -5227,12 +5291,13 @@ export type UpdateUserRoleMutationFn = ApolloReactCommon.MutationFunction) { - return ApolloReactHooks.useMutation(UpdateUserRoleDocument, baseOptions); +export function useUpdateUserRoleMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateUserRoleDocument, options); } export type UpdateUserRoleMutationHookResult = ReturnType; -export type UpdateUserRoleMutationResult = ApolloReactCommon.MutationResult; -export type UpdateUserRoleMutationOptions = ApolloReactCommon.BaseMutationOptions; +export type UpdateUserRoleMutationResult = Apollo.MutationResult; +export type UpdateUserRoleMutationOptions = Apollo.BaseMutationOptions; export const UsersDocument = gql` query users { invitedUsers { @@ -5293,12 +5358,14 @@ export const UsersDocument = gql` * }, * }); */ -export function useUsersQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { - return ApolloReactHooks.useQuery(UsersDocument, baseOptions); +export function useUsersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(UsersDocument, options); } -export function useUsersLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { - return ApolloReactHooks.useLazyQuery(UsersDocument, baseOptions); +export function useUsersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(UsersDocument, options); } export type UsersQueryHookResult = ReturnType; export type UsersLazyQueryHookResult = ReturnType; -export type UsersQueryResult = ApolloReactCommon.QueryResult; +export type UsersQueryResult = Apollo.QueryResult; diff --git a/frontend/src/shared/utils/accessToken.ts b/frontend/src/shared/utils/accessToken.ts deleted file mode 100644 index 739cb12..0000000 --- a/frontend/src/shared/utils/accessToken.ts +++ /dev/null @@ -1,18 +0,0 @@ -let accessToken = ''; - -export function setAccessToken(newToken: string) { - console.log(newToken); - accessToken = newToken; -} -export function getAccessToken() { - return accessToken; -} - -export async function getNewToken() { - return fetch('/auth/refresh_token', { - method: 'POST', - credentials: 'include', - }).then(x => { - return x.json(); - }); -} diff --git a/frontend/src/shared/utils/user.ts b/frontend/src/shared/utils/user.ts deleted file mode 100644 index a0a9d69..0000000 --- a/frontend/src/shared/utils/user.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PermissionObjectType, PermissionLevel } from 'App/context'; - -export default function userCan(level: PermissionLevel, objectType: PermissionObjectType) { - return false; -} diff --git a/frontend/src/taskcafe.d.ts b/frontend/src/taskcafe.d.ts index 94dba3d..f3c1077 100644 --- a/frontend/src/taskcafe.d.ts +++ b/frontend/src/taskcafe.d.ts @@ -59,11 +59,6 @@ type User = TaskUser & { owned: RelatedList; }; -type RefreshTokenResponse = { - accessToken: string; - setup?: null | { confirmToken: string }; -}; - type LoginFormData = { username: string; password: string; diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 5874beb..6981df2 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -5397,10 +5397,10 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -emoticon@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/emoticon/-/emoticon-3.2.0.tgz#c008ca7d7620fac742fe1bf4af8ff8fed154ae7f" - integrity sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg== +emoticon@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/emoticon/-/emoticon-4.0.0.tgz#827be62e6fee2a47517187992358adc5297ca320" + integrity sha512-Of6PNiAQGHhprBEootT77SdsynrVD97v1nzpiJ+FB2XCyvZmwdVI+hlpUduKWb2+7uVOcE1Myh3QAVB8vEBXvw== encodeurl@~1.0.2: version "1.0.2" diff --git a/go.mod b/go.mod index 09d0a73..266a897 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/jordanknott/taskcafe go 1.13 require ( - github.com/99designs/gqlgen v0.11.3 + github.com/99designs/gqlgen v0.13.0 github.com/RichardKnop/machinery v1.9.1 github.com/brianvoe/gofakeit/v5 v5.11.2 - github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/go-chi/chi v3.3.2+incompatible + github.com/go-chi/cors v1.2.0 github.com/golang-migrate/migrate/v4 v4.11.0 github.com/google/uuid v1.1.1 github.com/jinzhu/now v1.1.1 @@ -24,7 +24,7 @@ require ( github.com/spf13/cobra v1.0.0 github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.4.0 - github.com/vektah/gqlparser/v2 v2.0.1 + github.com/vektah/gqlparser/v2 v2.1.0 golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/mail.v2 v2.3.1 diff --git a/go.sum b/go.sum index 072877a..eb792bc 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/99designs/gqlgen v0.11.3 h1:oFSxl1DFS9X///uHV3y6CEfpcXWrDUxVblR4Xib2bs4= -github.com/99designs/gqlgen v0.11.3/go.mod h1:RgX5GRRdDWNkh4pBrdzNpNPFVsdoUFY2+adM6nb1N+4= +github.com/99designs/gqlgen v0.13.0 h1:haLTcUp3Vwp80xMVEg5KRNwzfUrgFdRmtBY8fuB8scA= +github.com/99designs/gqlgen v0.13.0/go.mod h1:NV130r6f4tpRWuAI+zsrSdooO/eWUv+Gyyoi3rEfXIk= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= @@ -96,9 +96,6 @@ github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwj github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= -github.com/brianvoe/gofakeit v1.2.0 h1:GGbzCqQx9ync4ObAUhRa3F/M73eL9VZL3X09WoTwphM= -github.com/brianvoe/gofakeit v3.18.0+incompatible h1:wDOmHc9DLG4nRjUVVaxA+CEglKOW72Y5+4WNxUIkjM8= -github.com/brianvoe/gofakeit v3.18.0+incompatible/go.mod h1:kfwdRA90vvNhPutZWfH7WPaDzUjz+CZFqG+rPkOjGOc= github.com/brianvoe/gofakeit/v5 v5.11.2 h1:Ny5Nsf4z2023ZvYP8ujW8p5B1t5sxhdFaQ/0IYXbeSA= github.com/brianvoe/gofakeit/v5 v5.11.2/go.mod h1:/ZENnKqX+XrN8SORLe/fu5lZDIo1tuPncWuRD+eyhSI= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -125,6 +122,7 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369 h1:XNT/Zf5l++1Pyg08/HV04ppB0gKxAqtZQBRYiYrUuYk= @@ -166,6 +164,8 @@ github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-chi/chi v3.3.2+incompatible h1:uQNcQN3NsV1j4ANsPh42P4ew4t6rnRbJb8frvpp31qQ= github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/cors v1.2.0 h1:tV1g1XENQ8ku4Bq3K9ub2AtgG+p16SmzeMSGTwrOKdE= +github.com/go-chi/cors v1.2.0/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -293,10 +293,10 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.2.0 h1:VJtLvh6VQym50czpZzx07z/kw9EgAxI3x1ZB8taTMQQ= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -550,6 +550,7 @@ github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= @@ -559,8 +560,8 @@ github.com/vanng822/go-premailer v0.0.0-20191214114701-be27abe028fe h1:9YnI5plmy github.com/vanng822/go-premailer v0.0.0-20191214114701-be27abe028fe/go.mod h1:JTFJA/t820uFDoyPpErFQ3rb3amdZoPtxcKervG0OE4= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e h1:+w0Zm/9gaWpEAyDlU1eKOuk5twTjAjuevXqcJJw8hrg= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/gqlparser/v2 v2.0.1 h1:xgl5abVnsd4hkN9rk65OJID9bfcLSMuTaTcZj777q1o= -github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= +github.com/vektah/gqlparser/v2 v2.1.0 h1:uiKJ+T5HMGGQM2kRKQ8Pxw8+Zq9qhhZhz/lieYvCMns= +github.com/vektah/gqlparser/v2 v2.1.0/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= diff --git a/internal/auth/auth.go b/internal/auth/auth.go deleted file mode 100644 index 55ec872..0000000 --- a/internal/auth/auth.go +++ /dev/null @@ -1,117 +0,0 @@ -package auth - -import ( - "time" - - "github.com/dgrijalva/jwt-go" - log "github.com/sirupsen/logrus" -) - -// RestrictedMode is used restrict JWT access to just the install route -type RestrictedMode string - -const ( - // Unrestricted is the code to allow access to all routes - Unrestricted RestrictedMode = "unrestricted" - // InstallOnly is the code to restrict access ONLY to install route - InstallOnly = "install_only" -) - -// Role is the role code for the user -type Role string - -const ( - // RoleAdmin is the code for the admin role - RoleAdmin Role = "admin" - // RoleMember is the code for the member role - RoleMember Role = "member" -) - -// AccessTokenClaims is the claims the access JWT token contains -type AccessTokenClaims struct { - UserID string `json:"userId"` - Restricted RestrictedMode `json:"restricted"` - OrgRole Role `json:"orgRole"` - jwt.StandardClaims -} - -// ErrExpiredToken is the error returned if the token has expired -type ErrExpiredToken struct{} - -// Error returns the error message for ErrExpiredToken -func (r *ErrExpiredToken) Error() string { - return "token is expired" -} - -// ErrMalformedToken is the error returned if the token has malformed -type ErrMalformedToken struct{} - -// Error returns the error message for ErrMalformedToken -func (r *ErrMalformedToken) Error() string { - return "token is malformed" -} - -// NewAccessToken generates a new JWT access token with the correct claims -func NewAccessToken(userID string, restrictedMode RestrictedMode, orgRole string, jwtKey []byte, expirationTime time.Duration) (string, error) { - role := RoleMember - if orgRole == "admin" { - role = RoleAdmin - } - accessExpirationTime := time.Now().Add(expirationTime) - accessClaims := &AccessTokenClaims{ - UserID: userID, - Restricted: restrictedMode, - OrgRole: role, - StandardClaims: jwt.StandardClaims{ExpiresAt: accessExpirationTime.Unix()}, - } - - accessToken := jwt.NewWithClaims(jwt.SigningMethodHS256, accessClaims) - accessTokenString, err := accessToken.SignedString(jwtKey) - if err != nil { - return "", err - } - return accessTokenString, nil -} - -// NewAccessTokenCustomExpiration creates an access token with a custom duration -func NewAccessTokenCustomExpiration(userID string, dur time.Duration, jwtKey []byte) (string, error) { - accessExpirationTime := time.Now().Add(dur) - accessClaims := &AccessTokenClaims{ - UserID: userID, - Restricted: Unrestricted, - OrgRole: RoleMember, - StandardClaims: jwt.StandardClaims{ExpiresAt: accessExpirationTime.Unix()}, - } - - accessToken := jwt.NewWithClaims(jwt.SigningMethodHS256, accessClaims) - accessTokenString, err := accessToken.SignedString(jwtKey) - if err != nil { - return "", err - } - return accessTokenString, nil -} - -// ValidateAccessToken validates a JWT access token and returns the contained claims or an error if it's invalid -func ValidateAccessToken(accessTokenString string, jwtKey []byte) (AccessTokenClaims, error) { - accessClaims := &AccessTokenClaims{} - accessToken, err := jwt.ParseWithClaims(accessTokenString, accessClaims, func(token *jwt.Token) (interface{}, error) { - return jwtKey, nil - }) - - if accessToken.Valid { - log.WithFields(log.Fields{ - "token": accessTokenString, - "timeToExpire": time.Unix(accessClaims.ExpiresAt, 0), - }).Debug("token is valid") - return *accessClaims, nil - } - - if ve, ok := err.(*jwt.ValidationError); ok { - if ve.Errors&(jwt.ValidationErrorMalformed|jwt.ValidationErrorSignatureInvalid) != 0 { - return AccessTokenClaims{}, &ErrMalformedToken{} - } else if ve.Errors&(jwt.ValidationErrorExpired|jwt.ValidationErrorNotValidYet) != 0 { - return AccessTokenClaims{}, &ErrExpiredToken{} - } - } - return AccessTokenClaims{}, err -} diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go deleted file mode 100644 index 866e54d..0000000 --- a/internal/auth/auth_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package auth - -import ( - "testing" - "time" - - "github.com/dgrijalva/jwt-go" -) - -// Override time value for jwt tests. Restore default value after. -func at(t time.Time, f func()) { - jwt.TimeFunc = func() time.Time { - return t - } - f() - jwt.TimeFunc = time.Now -} - -func TestAuth_ValidateAccessToken(t *testing.T) { - expectedToken := AccessTokenClaims{ - UserID: "1234", - Restricted: "unrestricted", - OrgRole: "member", - StandardClaims: jwt.StandardClaims{ExpiresAt: 1000}, - } - // jwt with the claims of expectedToken signed by secretKey - jwtString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0IiwicmVzdHJpY3RlZCI6InVucmVzdHJpY3RlZCIsIm9yZ1JvbGUiOiJtZW1iZXIiLCJleHAiOjEwMDB9.Zc4mrnogDccYffA7dWogdWsZMELftQluh2X5xDyzOpA" - secretKey := []byte("secret") - - // Check that decrypt failure is detected - token, err := ValidateAccessToken(jwtString, []byte("incorrectSecret")) - if err == nil { - t.Errorf("[IncorrectKey] Expected an error when validating a token with the incorrect key, instead got token %v", token) - } else if _, ok := err.(*ErrMalformedToken); !ok { - t.Errorf("[IncorrectKey] Expected an ErrMalformedToken error when validating a token with the incorrect key, instead got error %T:%v", err, err) - } - - // Check that token expiration check works - token, err = ValidateAccessToken(jwtString, secretKey) - if err == nil { - t.Errorf("[TokenExpired] Expected an error when validating an expired token, instead got token %v", token) - } else if _, ok := err.(*ErrExpiredToken); !ok { - t.Errorf("[TokenExpired] Expected an ErrExpiredToken error when validating an expired token, instead got error %T:%v", err, err) - } - - // Check that token validation works with a valid token - // Set the time to be valid for the token expiration - at(time.Unix(500, 0), func() { - token, err = ValidateAccessToken(jwtString, secretKey) - if err != nil { - t.Errorf("[TokenValid] Expected no errors when validating token, instead got err %v", err) - } else if token != expectedToken { - t.Errorf("[TokenValid] Expected token with claims %v but instead had claims %v", expectedToken, token) - } - }) -} \ No newline at end of file diff --git a/internal/commands/commands.go b/internal/commands/commands.go index be7de7d..1068bc3 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -86,6 +86,6 @@ func Execute() { viper.SetDefault("queue.store", "memcache://localhost:11211") rootCmd.SetVersionTemplate(VersionTemplate()) - rootCmd.AddCommand(newWebCmd(), newMigrateCmd(), newTokenCmd(), newWorkerCmd(), newResetPasswordCmd(), newSeedCmd()) + rootCmd.AddCommand(newWebCmd(), newMigrateCmd(), newWorkerCmd(), newResetPasswordCmd(), newSeedCmd()) rootCmd.Execute() } diff --git a/internal/commands/token.go b/internal/commands/token.go deleted file mode 100644 index 9477a9a..0000000 --- a/internal/commands/token.go +++ /dev/null @@ -1,35 +0,0 @@ -package commands - -import ( - "errors" - "fmt" - "strings" - "time" - - "github.com/jordanknott/taskcafe/internal/auth" - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -func newTokenCmd() *cobra.Command { - return &cobra.Command{ - Use: "token", - Short: "Create a long lived JWT token for dev purposes", - Long: "Create a long lived JWT token for dev purposes", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - secret := viper.GetString("server.secret") - if strings.TrimSpace(secret) == "" { - return errors.New("server.secret must be set (TASKCAFE_SERVER_SECRET)") - } - token, err := auth.NewAccessTokenCustomExpiration(args[0], time.Hour*24, []byte(secret)) - if err != nil { - log.WithError(err).Error("issue while creating access token") - return err - } - fmt.Println(token) - return nil - }, - } -} diff --git a/internal/db/models.go b/internal/db/models.go index f9ba47c..eb5ce0a 100644 --- a/internal/db/models.go +++ b/internal/db/models.go @@ -10,6 +10,13 @@ import ( "github.com/google/uuid" ) +type AuthToken struct { + TokenID uuid.UUID `json:"token_id"` + UserID uuid.UUID `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + ExpiresAt time.Time `json:"expires_at"` +} + type LabelColor struct { LabelColorID uuid.UUID `json:"label_color_id"` ColorHex string `json:"color_hex"` @@ -74,13 +81,6 @@ type ProjectMemberInvited struct { UserAccountInvitedID uuid.UUID `json:"user_account_invited_id"` } -type RefreshToken struct { - TokenID uuid.UUID `json:"token_id"` - UserID uuid.UUID `json:"user_id"` - CreatedAt time.Time `json:"created_at"` - ExpiresAt time.Time `json:"expires_at"` -} - type Role struct { Code string `json:"code"` Name string `json:"name"` diff --git a/internal/db/querier.go b/internal/db/querier.go index 8d005c4..284e30b 100644 --- a/internal/db/querier.go +++ b/internal/db/querier.go @@ -9,6 +9,7 @@ import ( ) type Querier interface { + CreateAuthToken(ctx context.Context, arg CreateAuthTokenParams) (AuthToken, error) CreateConfirmToken(ctx context.Context, email string) (UserAccountConfirmToken, error) CreateInvitedProjectMember(ctx context.Context, arg CreateInvitedProjectMemberParams) (ProjectMemberInvited, error) CreateInvitedUser(ctx context.Context, email string) (UserAccountInvited, error) @@ -20,7 +21,6 @@ type Querier interface { CreatePersonalProjectLink(ctx context.Context, arg CreatePersonalProjectLinkParams) (PersonalProject, error) CreateProjectLabel(ctx context.Context, arg CreateProjectLabelParams) (ProjectLabel, error) CreateProjectMember(ctx context.Context, arg CreateProjectMemberParams) (ProjectMember, error) - CreateRefreshToken(ctx context.Context, arg CreateRefreshTokenParams) (RefreshToken, error) CreateSystemOption(ctx context.Context, arg CreateSystemOptionParams) (SystemOption, error) CreateTask(ctx context.Context, arg CreateTaskParams) (Task, error) CreateTaskActivity(ctx context.Context, arg CreateTaskActivityParams) (TaskActivity, error) @@ -35,6 +35,8 @@ type Querier interface { CreateTeamMember(ctx context.Context, arg CreateTeamMemberParams) (TeamMember, error) CreateTeamProject(ctx context.Context, arg CreateTeamProjectParams) (Project, error) CreateUserAccount(ctx context.Context, arg CreateUserAccountParams) (UserAccount, error) + DeleteAuthTokenByID(ctx context.Context, tokenID uuid.UUID) error + DeleteAuthTokenByUserID(ctx context.Context, userID uuid.UUID) error DeleteConfirmTokenForEmail(ctx context.Context, email string) error DeleteExpiredTokens(ctx context.Context) error DeleteInvitedProjectMemberByID(ctx context.Context, projectMemberInvitedID uuid.UUID) error @@ -43,8 +45,6 @@ type Querier interface { DeleteProjectLabelByID(ctx context.Context, projectLabelID uuid.UUID) error DeleteProjectMember(ctx context.Context, arg DeleteProjectMemberParams) error DeleteProjectMemberInvitedForEmail(ctx context.Context, email string) error - DeleteRefreshTokenByID(ctx context.Context, tokenID uuid.UUID) error - DeleteRefreshTokenByUserID(ctx context.Context, userID uuid.UUID) error DeleteTaskAssignedByID(ctx context.Context, arg DeleteTaskAssignedByIDParams) (TaskAssigned, error) DeleteTaskByID(ctx context.Context, taskID uuid.UUID) error DeleteTaskChecklistByID(ctx context.Context, taskChecklistID uuid.UUID) error @@ -71,6 +71,7 @@ type Querier interface { GetAssignedMembersForTask(ctx context.Context, taskID uuid.UUID) ([]TaskAssigned, error) GetAssignedTasksDueDateForUserID(ctx context.Context, arg GetAssignedTasksDueDateForUserIDParams) ([]Task, error) GetAssignedTasksProjectForUserID(ctx context.Context, arg GetAssignedTasksProjectForUserIDParams) ([]Task, error) + GetAuthTokenByID(ctx context.Context, tokenID uuid.UUID) (AuthToken, error) GetCommentsForTaskID(ctx context.Context, taskID uuid.UUID) ([]TaskComment, error) GetConfirmTokenByEmail(ctx context.Context, email string) (UserAccountConfirmToken, error) GetConfirmTokenByID(ctx context.Context, confirmTokenID uuid.UUID) (UserAccountConfirmToken, error) @@ -100,7 +101,6 @@ type Querier interface { GetProjectRolesForUserID(ctx context.Context, userID uuid.UUID) ([]GetProjectRolesForUserIDRow, error) GetProjectsForInvitedMember(ctx context.Context, email string) ([]uuid.UUID, error) GetRecentlyAssignedTaskForUserID(ctx context.Context, arg GetRecentlyAssignedTaskForUserIDParams) ([]Task, error) - GetRefreshTokenByID(ctx context.Context, tokenID uuid.UUID) (RefreshToken, error) GetRoleForProjectMemberByUserID(ctx context.Context, arg GetRoleForProjectMemberByUserIDParams) (Role, error) GetRoleForTeamMember(ctx context.Context, arg GetRoleForTeamMemberParams) (Role, error) GetRoleForUserID(ctx context.Context, userID uuid.UUID) (GetRoleForUserIDRow, error) diff --git a/internal/db/query/token.sql b/internal/db/query/token.sql index 7b14cee..b71207a 100644 --- a/internal/db/query/token.sql +++ b/internal/db/query/token.sql @@ -1,14 +1,14 @@ --- name: GetRefreshTokenByID :one -SELECT * FROM refresh_token WHERE token_id = $1; +-- name: GetAuthTokenByID :one +SELECT * FROM auth_token WHERE token_id = $1; --- name: CreateRefreshToken :one -INSERT INTO refresh_token (user_id, created_at, expires_at) VALUES ($1, $2, $3) RETURNING *; +-- name: CreateAuthToken :one +INSERT INTO auth_token (user_id, created_at, expires_at) VALUES ($1, $2, $3) RETURNING *; --- name: DeleteRefreshTokenByID :exec -DELETE FROM refresh_token WHERE token_id = $1; +-- name: DeleteAuthTokenByID :exec +DELETE FROM auth_token WHERE token_id = $1; --- name: DeleteRefreshTokenByUserID :exec -DELETE FROM refresh_token WHERE user_id = $1; +-- name: DeleteAuthTokenByUserID :exec +DELETE FROM auth_token WHERE user_id = $1; -- name: DeleteExpiredTokens :exec -DELETE FROM refresh_token WHERE expires_at <= NOW(); +DELETE FROM auth_token WHERE expires_at <= NOW(); diff --git a/internal/db/token.sql.go b/internal/db/token.sql.go index 6fb4f3c..f7ad997 100644 --- a/internal/db/token.sql.go +++ b/internal/db/token.sql.go @@ -10,19 +10,19 @@ import ( "github.com/google/uuid" ) -const createRefreshToken = `-- name: CreateRefreshToken :one -INSERT INTO refresh_token (user_id, created_at, expires_at) VALUES ($1, $2, $3) RETURNING token_id, user_id, created_at, expires_at +const createAuthToken = `-- name: CreateAuthToken :one +INSERT INTO auth_token (user_id, created_at, expires_at) VALUES ($1, $2, $3) RETURNING token_id, user_id, created_at, expires_at ` -type CreateRefreshTokenParams struct { +type CreateAuthTokenParams struct { UserID uuid.UUID `json:"user_id"` CreatedAt time.Time `json:"created_at"` ExpiresAt time.Time `json:"expires_at"` } -func (q *Queries) CreateRefreshToken(ctx context.Context, arg CreateRefreshTokenParams) (RefreshToken, error) { - row := q.db.QueryRowContext(ctx, createRefreshToken, arg.UserID, arg.CreatedAt, arg.ExpiresAt) - var i RefreshToken +func (q *Queries) CreateAuthToken(ctx context.Context, arg CreateAuthTokenParams) (AuthToken, error) { + row := q.db.QueryRowContext(ctx, createAuthToken, arg.UserID, arg.CreatedAt, arg.ExpiresAt) + var i AuthToken err := row.Scan( &i.TokenID, &i.UserID, @@ -32,8 +32,26 @@ func (q *Queries) CreateRefreshToken(ctx context.Context, arg CreateRefreshToken return i, err } +const deleteAuthTokenByID = `-- name: DeleteAuthTokenByID :exec +DELETE FROM auth_token WHERE token_id = $1 +` + +func (q *Queries) DeleteAuthTokenByID(ctx context.Context, tokenID uuid.UUID) error { + _, err := q.db.ExecContext(ctx, deleteAuthTokenByID, tokenID) + return err +} + +const deleteAuthTokenByUserID = `-- name: DeleteAuthTokenByUserID :exec +DELETE FROM auth_token WHERE user_id = $1 +` + +func (q *Queries) DeleteAuthTokenByUserID(ctx context.Context, userID uuid.UUID) error { + _, err := q.db.ExecContext(ctx, deleteAuthTokenByUserID, userID) + return err +} + const deleteExpiredTokens = `-- name: DeleteExpiredTokens :exec -DELETE FROM refresh_token WHERE expires_at <= NOW() +DELETE FROM auth_token WHERE expires_at <= NOW() ` func (q *Queries) DeleteExpiredTokens(ctx context.Context) error { @@ -41,31 +59,13 @@ func (q *Queries) DeleteExpiredTokens(ctx context.Context) error { return err } -const deleteRefreshTokenByID = `-- name: DeleteRefreshTokenByID :exec -DELETE FROM refresh_token WHERE token_id = $1 +const getAuthTokenByID = `-- name: GetAuthTokenByID :one +SELECT token_id, user_id, created_at, expires_at FROM auth_token WHERE token_id = $1 ` -func (q *Queries) DeleteRefreshTokenByID(ctx context.Context, tokenID uuid.UUID) error { - _, err := q.db.ExecContext(ctx, deleteRefreshTokenByID, tokenID) - return err -} - -const deleteRefreshTokenByUserID = `-- name: DeleteRefreshTokenByUserID :exec -DELETE FROM refresh_token WHERE user_id = $1 -` - -func (q *Queries) DeleteRefreshTokenByUserID(ctx context.Context, userID uuid.UUID) error { - _, err := q.db.ExecContext(ctx, deleteRefreshTokenByUserID, userID) - return err -} - -const getRefreshTokenByID = `-- name: GetRefreshTokenByID :one -SELECT token_id, user_id, created_at, expires_at FROM refresh_token WHERE token_id = $1 -` - -func (q *Queries) GetRefreshTokenByID(ctx context.Context, tokenID uuid.UUID) (RefreshToken, error) { - row := q.db.QueryRowContext(ctx, getRefreshTokenByID, tokenID) - var i RefreshToken +func (q *Queries) GetAuthTokenByID(ctx context.Context, tokenID uuid.UUID) (AuthToken, error) { + row := q.db.QueryRowContext(ctx, getAuthTokenByID, tokenID) + var i AuthToken err := row.Scan( &i.TokenID, &i.UserID, diff --git a/internal/graph/generated.go b/internal/graph/generated.go index 28bc28d..1d6b081 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -45,7 +45,6 @@ type ResolverRoot interface { Project() ProjectResolver ProjectLabel() ProjectLabelResolver Query() QueryResolver - RefreshToken() RefreshTokenResolver Task() TaskResolver TaskActivity() TaskActivityResolver TaskChecklist() TaskChecklistResolver @@ -186,6 +185,7 @@ type ComplexityRoot struct { } MePayload struct { + Organization func(childComplexity int) int ProjectRoles func(childComplexity int) int TeamRoles func(childComplexity int) int User func(childComplexity int) int @@ -219,7 +219,6 @@ type ComplexityRoot struct { ClearProfileAvatar func(childComplexity int) int CreateProject func(childComplexity int, input NewProject) int CreateProjectLabel func(childComplexity int, input NewProjectLabel) int - CreateRefreshToken func(childComplexity int, input NewRefreshToken) int CreateTask func(childComplexity int, input NewTask) int CreateTaskChecklist func(childComplexity int, input CreateTaskChecklist) int CreateTaskChecklistItem func(childComplexity int, input CreateTaskChecklistItem) int @@ -327,6 +326,7 @@ type ComplexityRoot struct { Labels func(childComplexity int) int Members func(childComplexity int) int Name func(childComplexity int) int + Permission func(childComplexity int) int TaskGroups func(childComplexity int) int Team func(childComplexity int) int } @@ -338,6 +338,12 @@ type ComplexityRoot struct { Name func(childComplexity int) int } + ProjectPermission struct { + Org func(childComplexity int) int + Project func(childComplexity int) int + Team func(childComplexity int) int + } + ProjectRole struct { ProjectID func(childComplexity int) int RoleCode func(childComplexity int) int @@ -366,13 +372,6 @@ type ComplexityRoot struct { Users func(childComplexity int) int } - RefreshToken struct { - CreatedAt func(childComplexity int) int - ExpiresAt func(childComplexity int) int - ID func(childComplexity int) int - UserID func(childComplexity int) int - } - Role struct { Code func(childComplexity int) int Name func(childComplexity int) int @@ -460,10 +459,16 @@ type ComplexityRoot struct { } Team struct { - CreatedAt func(childComplexity int) int - ID func(childComplexity int) int - Members func(childComplexity int) int - Name func(childComplexity int) int + CreatedAt func(childComplexity int) int + ID func(childComplexity int) int + Members func(childComplexity int) int + Name func(childComplexity int) int + Permission func(childComplexity int) int + } + + TeamPermission struct { + Org func(childComplexity int) int + Team func(childComplexity int) int } TeamRole struct { @@ -587,7 +592,6 @@ type MutationResolver interface { CreateTeamMember(ctx context.Context, input CreateTeamMember) (*CreateTeamMemberPayload, error) UpdateTeamMemberRole(ctx context.Context, input UpdateTeamMemberRole) (*UpdateTeamMemberRolePayload, error) DeleteTeamMember(ctx context.Context, input DeleteTeamMember) (*DeleteTeamMemberPayload, error) - CreateRefreshToken(ctx context.Context, input NewRefreshToken) (*db.RefreshToken, error) CreateUserAccount(ctx context.Context, input NewUserAccount) (*db.UserAccount, error) DeleteUserAccount(ctx context.Context, input DeleteUserAccount) (*DeleteUserAccountPayload, error) DeleteInvitedUserAccount(ctx context.Context, input DeleteInvitedUserAccount) (*DeleteInvitedUserAccountPayload, error) @@ -615,6 +619,7 @@ type ProjectResolver interface { TaskGroups(ctx context.Context, obj *db.Project) ([]db.TaskGroup, error) Members(ctx context.Context, obj *db.Project) ([]Member, error) InvitedMembers(ctx context.Context, obj *db.Project) ([]InvitedMember, error) + Permission(ctx context.Context, obj *db.Project) (*ProjectPermission, error) Labels(ctx context.Context, obj *db.Project) ([]db.ProjectLabel, error) } type ProjectLabelResolver interface { @@ -640,9 +645,6 @@ type QueryResolver interface { Notifications(ctx context.Context) ([]db.Notification, error) SearchMembers(ctx context.Context, input MemberSearchFilter) ([]MemberSearchResult, error) } -type RefreshTokenResolver interface { - ID(ctx context.Context, obj *db.RefreshToken) (uuid.UUID, error) -} type TaskResolver interface { ID(ctx context.Context, obj *db.Task) (uuid.UUID, error) TaskGroup(ctx context.Context, obj *db.Task) (*db.TaskGroup, error) @@ -694,6 +696,7 @@ type TaskLabelResolver interface { type TeamResolver interface { ID(ctx context.Context, obj *db.Team) (uuid.UUID, error) + Permission(ctx context.Context, obj *db.Team) (*TeamPermission, error) Members(ctx context.Context, obj *db.Team) ([]Member, error) } type UserAccountResolver interface { @@ -1099,6 +1102,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.LabelColor.Position(childComplexity), true + case "MePayload.organization": + if e.complexity.MePayload.Organization == nil { + break + } + + return e.complexity.MePayload.Organization(childComplexity), true + case "MePayload.projectRoles": if e.complexity.MePayload.ProjectRoles == nil { break @@ -1266,18 +1276,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateProjectLabel(childComplexity, args["input"].(NewProjectLabel)), true - case "Mutation.createRefreshToken": - if e.complexity.Mutation.CreateRefreshToken == nil { - break - } - - args, err := ec.field_Mutation_createRefreshToken_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.CreateRefreshToken(childComplexity, args["input"].(NewRefreshToken)), true - case "Mutation.createTask": if e.complexity.Mutation.CreateTask == nil { break @@ -2093,6 +2091,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Project.Name(childComplexity), true + case "Project.permission": + if e.complexity.Project.Permission == nil { + break + } + + return e.complexity.Project.Permission(childComplexity), true + case "Project.taskGroups": if e.complexity.Project.TaskGroups == nil { break @@ -2135,6 +2140,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ProjectLabel.Name(childComplexity), true + case "ProjectPermission.org": + if e.complexity.ProjectPermission.Org == nil { + break + } + + return e.complexity.ProjectPermission.Org(childComplexity), true + + case "ProjectPermission.project": + if e.complexity.ProjectPermission.Project == nil { + break + } + + return e.complexity.ProjectPermission.Project(childComplexity), true + + case "ProjectPermission.team": + if e.complexity.ProjectPermission.Team == nil { + break + } + + return e.complexity.ProjectPermission.Team(childComplexity), true + case "ProjectRole.projectID": if e.complexity.ProjectRole.ProjectID == nil { break @@ -2303,34 +2329,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Users(childComplexity), true - case "RefreshToken.createdAt": - if e.complexity.RefreshToken.CreatedAt == nil { - break - } - - return e.complexity.RefreshToken.CreatedAt(childComplexity), true - - case "RefreshToken.expiresAt": - if e.complexity.RefreshToken.ExpiresAt == nil { - break - } - - return e.complexity.RefreshToken.ExpiresAt(childComplexity), true - - case "RefreshToken.id": - if e.complexity.RefreshToken.ID == nil { - break - } - - return e.complexity.RefreshToken.ID(childComplexity), true - - case "RefreshToken.userId": - if e.complexity.RefreshToken.UserID == nil { - break - } - - return e.complexity.RefreshToken.UserID(childComplexity), true - case "Role.code": if e.complexity.Role.Code == nil { break @@ -2730,6 +2728,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Team.Name(childComplexity), true + case "Team.permission": + if e.complexity.Team.Permission == nil { + break + } + + return e.complexity.Team.Permission(childComplexity), true + + case "TeamPermission.org": + if e.complexity.TeamPermission.Org == nil { + break + } + + return e.complexity.TeamPermission.Org(childComplexity), true + + case "TeamPermission.team": + if e.complexity.TeamPermission.Team == nil { + break + } + + return e.complexity.TeamPermission.Team(childComplexity), true + case "TeamRole.roleCode": if e.complexity.TeamRole.RoleCode == nil { break @@ -3018,7 +3037,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er } var sources = []*ast.Source{ - &ast.Source{Name: "internal/graph/schema.graphqls", Input: `scalar Time + {Name: "internal/graph/schema.graphqls", Input: `scalar Time scalar UUID scalar Upload @@ -3070,13 +3089,6 @@ type Member { member: MemberList! } -type RefreshToken { - id: ID! - userId: UUID! - expiresAt: Time! - createdAt: Time! -} - type Role { code: String! name: String! @@ -3117,6 +3129,7 @@ type Team { id: ID! createdAt: Time! name: String! + permission: TeamPermission! members: [Member!]! } @@ -3126,6 +3139,17 @@ type InvitedMember { invitedOn: Time! } +type TeamPermission { + team: RoleCode! + org: RoleCode! +} + +type ProjectPermission { + team: RoleCode! + project: RoleCode! + org: RoleCode! +} + type Project { id: ID! createdAt: Time! @@ -3134,6 +3158,7 @@ type Project { taskGroups: [TaskGroup!]! members: [Member!]! invitedMembers: [InvitedMember!]! + permission: ProjectPermission! labels: [ProjectLabel!]! } @@ -3334,6 +3359,7 @@ type ProjectRole { type MePayload { user: UserAccount! + organization: RoleCode teamRoles: [TeamRole!]! projectRoles: [ProjectRole!]! } @@ -3901,7 +3927,6 @@ type UpdateTeamMemberRolePayload { } extend type Mutation { - createRefreshToken(input: NewRefreshToken!): RefreshToken! createUserAccount(input: NewUserAccount!): UserAccount! @hasRole(roles: [ADMIN], level: ORG, type: ORG) deleteUserAccount(input: DeleteUserAccount!): @@ -3974,10 +3999,6 @@ type UpdateUserRolePayload { user: UserAccount! } -input NewRefreshToken { - userID: UUID! -} - input NewUserAccount { username: String! email: String! @@ -4014,6 +4035,7 @@ func (ec *executionContext) dir_hasRole_args(ctx context.Context, rawArgs map[st args := map[string]interface{}{} var arg0 []RoleLevel if tmp, ok := rawArgs["roles"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("roles")) arg0, err = ec.unmarshalNRoleLevel2ᚕgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleLevelᚄ(ctx, tmp) if err != nil { return nil, err @@ -4022,6 +4044,7 @@ func (ec *executionContext) dir_hasRole_args(ctx context.Context, rawArgs map[st args["roles"] = arg0 var arg1 ActionLevel if tmp, ok := rawArgs["level"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("level")) arg1, err = ec.unmarshalNActionLevel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActionLevel(ctx, tmp) if err != nil { return nil, err @@ -4030,6 +4053,7 @@ func (ec *executionContext) dir_hasRole_args(ctx context.Context, rawArgs map[st args["level"] = arg1 var arg2 ObjectType if tmp, ok := rawArgs["type"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) arg2, err = ec.unmarshalNObjectType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐObjectType(ctx, tmp) if err != nil { return nil, err @@ -4044,6 +4068,7 @@ func (ec *executionContext) field_Mutation_addTaskLabel_args(ctx context.Context args := map[string]interface{}{} var arg0 *AddTaskLabelInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalOAddTaskLabelInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAddTaskLabelInput(ctx, tmp) if err != nil { return nil, err @@ -4058,6 +4083,7 @@ func (ec *executionContext) field_Mutation_assignTask_args(ctx context.Context, args := map[string]interface{}{} var arg0 *AssignTaskInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalOAssignTaskInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAssignTaskInput(ctx, tmp) if err != nil { return nil, err @@ -4072,6 +4098,7 @@ func (ec *executionContext) field_Mutation_createProjectLabel_args(ctx context.C args := map[string]interface{}{} var arg0 NewProjectLabel if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewProjectLabel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewProjectLabel(ctx, tmp) if err != nil { return nil, err @@ -4086,6 +4113,7 @@ func (ec *executionContext) field_Mutation_createProject_args(ctx context.Contex args := map[string]interface{}{} var arg0 NewProject if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewProject2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewProject(ctx, tmp) if err != nil { return nil, err @@ -4095,25 +4123,12 @@ func (ec *executionContext) field_Mutation_createProject_args(ctx context.Contex return args, nil } -func (ec *executionContext) field_Mutation_createRefreshToken_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 NewRefreshToken - if tmp, ok := rawArgs["input"]; ok { - arg0, err = ec.unmarshalNNewRefreshToken2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewRefreshToken(ctx, tmp) - if err != nil { - return nil, err - } - } - args["input"] = arg0 - return args, nil -} - func (ec *executionContext) field_Mutation_createTaskChecklistItem_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 CreateTaskChecklistItem if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNCreateTaskChecklistItem2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskChecklistItem(ctx, tmp) if err != nil { return nil, err @@ -4128,6 +4143,7 @@ func (ec *executionContext) field_Mutation_createTaskChecklist_args(ctx context. args := map[string]interface{}{} var arg0 CreateTaskChecklist if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNCreateTaskChecklist2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskChecklist(ctx, tmp) if err != nil { return nil, err @@ -4142,6 +4158,7 @@ func (ec *executionContext) field_Mutation_createTaskComment_args(ctx context.Co args := map[string]interface{}{} var arg0 *CreateTaskComment if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalOCreateTaskComment2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskComment(ctx, tmp) if err != nil { return nil, err @@ -4156,6 +4173,7 @@ func (ec *executionContext) field_Mutation_createTaskGroup_args(ctx context.Cont args := map[string]interface{}{} var arg0 NewTaskGroup if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewTaskGroup2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTaskGroup(ctx, tmp) if err != nil { return nil, err @@ -4170,6 +4188,7 @@ func (ec *executionContext) field_Mutation_createTask_args(ctx context.Context, args := map[string]interface{}{} var arg0 NewTask if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewTask2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTask(ctx, tmp) if err != nil { return nil, err @@ -4184,6 +4203,7 @@ func (ec *executionContext) field_Mutation_createTeamMember_args(ctx context.Con args := map[string]interface{}{} var arg0 CreateTeamMember if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNCreateTeamMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTeamMember(ctx, tmp) if err != nil { return nil, err @@ -4198,6 +4218,7 @@ func (ec *executionContext) field_Mutation_createTeam_args(ctx context.Context, args := map[string]interface{}{} var arg0 NewTeam if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewTeam2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTeam(ctx, tmp) if err != nil { return nil, err @@ -4212,6 +4233,7 @@ func (ec *executionContext) field_Mutation_createUserAccount_args(ctx context.Co args := map[string]interface{}{} var arg0 NewUserAccount if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewUserAccount2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewUserAccount(ctx, tmp) if err != nil { return nil, err @@ -4226,6 +4248,7 @@ func (ec *executionContext) field_Mutation_deleteInvitedProjectMember_args(ctx c args := map[string]interface{}{} var arg0 DeleteInvitedProjectMember if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteInvitedProjectMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteInvitedProjectMember(ctx, tmp) if err != nil { return nil, err @@ -4240,6 +4263,7 @@ func (ec *executionContext) field_Mutation_deleteInvitedUserAccount_args(ctx con args := map[string]interface{}{} var arg0 DeleteInvitedUserAccount if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteInvitedUserAccount2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteInvitedUserAccount(ctx, tmp) if err != nil { return nil, err @@ -4254,6 +4278,7 @@ func (ec *executionContext) field_Mutation_deleteProjectLabel_args(ctx context.C args := map[string]interface{}{} var arg0 DeleteProjectLabel if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteProjectLabel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteProjectLabel(ctx, tmp) if err != nil { return nil, err @@ -4268,6 +4293,7 @@ func (ec *executionContext) field_Mutation_deleteProjectMember_args(ctx context. args := map[string]interface{}{} var arg0 DeleteProjectMember if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteProjectMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteProjectMember(ctx, tmp) if err != nil { return nil, err @@ -4282,6 +4308,7 @@ func (ec *executionContext) field_Mutation_deleteProject_args(ctx context.Contex args := map[string]interface{}{} var arg0 DeleteProject if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteProject2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteProject(ctx, tmp) if err != nil { return nil, err @@ -4296,6 +4323,7 @@ func (ec *executionContext) field_Mutation_deleteTaskChecklistItem_args(ctx cont args := map[string]interface{}{} var arg0 DeleteTaskChecklistItem if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteTaskChecklistItem2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskChecklistItem(ctx, tmp) if err != nil { return nil, err @@ -4310,6 +4338,7 @@ func (ec *executionContext) field_Mutation_deleteTaskChecklist_args(ctx context. args := map[string]interface{}{} var arg0 DeleteTaskChecklist if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteTaskChecklist2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskChecklist(ctx, tmp) if err != nil { return nil, err @@ -4324,6 +4353,7 @@ func (ec *executionContext) field_Mutation_deleteTaskComment_args(ctx context.Co args := map[string]interface{}{} var arg0 *DeleteTaskComment if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalODeleteTaskComment2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskComment(ctx, tmp) if err != nil { return nil, err @@ -4338,6 +4368,7 @@ func (ec *executionContext) field_Mutation_deleteTaskGroupTasks_args(ctx context args := map[string]interface{}{} var arg0 DeleteTaskGroupTasks if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteTaskGroupTasks2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskGroupTasks(ctx, tmp) if err != nil { return nil, err @@ -4352,6 +4383,7 @@ func (ec *executionContext) field_Mutation_deleteTaskGroup_args(ctx context.Cont args := map[string]interface{}{} var arg0 DeleteTaskGroupInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteTaskGroupInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskGroupInput(ctx, tmp) if err != nil { return nil, err @@ -4366,6 +4398,7 @@ func (ec *executionContext) field_Mutation_deleteTask_args(ctx context.Context, args := map[string]interface{}{} var arg0 DeleteTaskInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteTaskInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskInput(ctx, tmp) if err != nil { return nil, err @@ -4380,6 +4413,7 @@ func (ec *executionContext) field_Mutation_deleteTeamMember_args(ctx context.Con args := map[string]interface{}{} var arg0 DeleteTeamMember if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteTeamMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTeamMember(ctx, tmp) if err != nil { return nil, err @@ -4394,6 +4428,7 @@ func (ec *executionContext) field_Mutation_deleteTeam_args(ctx context.Context, args := map[string]interface{}{} var arg0 DeleteTeam if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteTeam2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTeam(ctx, tmp) if err != nil { return nil, err @@ -4408,6 +4443,7 @@ func (ec *executionContext) field_Mutation_deleteUserAccount_args(ctx context.Co args := map[string]interface{}{} var arg0 DeleteUserAccount if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDeleteUserAccount2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteUserAccount(ctx, tmp) if err != nil { return nil, err @@ -4422,6 +4458,7 @@ func (ec *executionContext) field_Mutation_duplicateTaskGroup_args(ctx context.C args := map[string]interface{}{} var arg0 DuplicateTaskGroup if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNDuplicateTaskGroup2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDuplicateTaskGroup(ctx, tmp) if err != nil { return nil, err @@ -4436,6 +4473,7 @@ func (ec *executionContext) field_Mutation_inviteProjectMembers_args(ctx context args := map[string]interface{}{} var arg0 InviteProjectMembers if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNInviteProjectMembers2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐInviteProjectMembers(ctx, tmp) if err != nil { return nil, err @@ -4450,6 +4488,7 @@ func (ec *executionContext) field_Mutation_logoutUser_args(ctx context.Context, args := map[string]interface{}{} var arg0 LogoutUser if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNLogoutUser2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐLogoutUser(ctx, tmp) if err != nil { return nil, err @@ -4464,6 +4503,7 @@ func (ec *executionContext) field_Mutation_removeTaskLabel_args(ctx context.Cont args := map[string]interface{}{} var arg0 *RemoveTaskLabelInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalORemoveTaskLabelInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRemoveTaskLabelInput(ctx, tmp) if err != nil { return nil, err @@ -4478,6 +4518,7 @@ func (ec *executionContext) field_Mutation_setTaskChecklistItemComplete_args(ctx args := map[string]interface{}{} var arg0 SetTaskChecklistItemComplete if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNSetTaskChecklistItemComplete2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐSetTaskChecklistItemComplete(ctx, tmp) if err != nil { return nil, err @@ -4492,6 +4533,7 @@ func (ec *executionContext) field_Mutation_setTaskComplete_args(ctx context.Cont args := map[string]interface{}{} var arg0 SetTaskComplete if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNSetTaskComplete2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐSetTaskComplete(ctx, tmp) if err != nil { return nil, err @@ -4506,6 +4548,7 @@ func (ec *executionContext) field_Mutation_sortTaskGroup_args(ctx context.Contex args := map[string]interface{}{} var arg0 SortTaskGroup if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNSortTaskGroup2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐSortTaskGroup(ctx, tmp) if err != nil { return nil, err @@ -4520,6 +4563,7 @@ func (ec *executionContext) field_Mutation_toggleTaskLabel_args(ctx context.Cont args := map[string]interface{}{} var arg0 ToggleTaskLabelInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNToggleTaskLabelInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐToggleTaskLabelInput(ctx, tmp) if err != nil { return nil, err @@ -4534,6 +4578,7 @@ func (ec *executionContext) field_Mutation_unassignTask_args(ctx context.Context args := map[string]interface{}{} var arg0 *UnassignTaskInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalOUnassignTaskInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUnassignTaskInput(ctx, tmp) if err != nil { return nil, err @@ -4548,6 +4593,7 @@ func (ec *executionContext) field_Mutation_updateProjectLabelColor_args(ctx cont args := map[string]interface{}{} var arg0 UpdateProjectLabelColor if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateProjectLabelColor2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectLabelColor(ctx, tmp) if err != nil { return nil, err @@ -4562,6 +4608,7 @@ func (ec *executionContext) field_Mutation_updateProjectLabelName_args(ctx conte args := map[string]interface{}{} var arg0 UpdateProjectLabelName if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateProjectLabelName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectLabelName(ctx, tmp) if err != nil { return nil, err @@ -4576,6 +4623,7 @@ func (ec *executionContext) field_Mutation_updateProjectLabel_args(ctx context.C args := map[string]interface{}{} var arg0 UpdateProjectLabel if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateProjectLabel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectLabel(ctx, tmp) if err != nil { return nil, err @@ -4590,6 +4638,7 @@ func (ec *executionContext) field_Mutation_updateProjectMemberRole_args(ctx cont args := map[string]interface{}{} var arg0 UpdateProjectMemberRole if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateProjectMemberRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectMemberRole(ctx, tmp) if err != nil { return nil, err @@ -4604,6 +4653,7 @@ func (ec *executionContext) field_Mutation_updateProjectName_args(ctx context.Co args := map[string]interface{}{} var arg0 *UpdateProjectName if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalOUpdateProjectName2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectName(ctx, tmp) if err != nil { return nil, err @@ -4618,6 +4668,7 @@ func (ec *executionContext) field_Mutation_updateTaskChecklistItemLocation_args( args := map[string]interface{}{} var arg0 UpdateTaskChecklistItemLocation if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskChecklistItemLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistItemLocation(ctx, tmp) if err != nil { return nil, err @@ -4632,6 +4683,7 @@ func (ec *executionContext) field_Mutation_updateTaskChecklistItemName_args(ctx args := map[string]interface{}{} var arg0 UpdateTaskChecklistItemName if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskChecklistItemName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistItemName(ctx, tmp) if err != nil { return nil, err @@ -4646,6 +4698,7 @@ func (ec *executionContext) field_Mutation_updateTaskChecklistLocation_args(ctx args := map[string]interface{}{} var arg0 UpdateTaskChecklistLocation if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskChecklistLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistLocation(ctx, tmp) if err != nil { return nil, err @@ -4660,6 +4713,7 @@ func (ec *executionContext) field_Mutation_updateTaskChecklistName_args(ctx cont args := map[string]interface{}{} var arg0 UpdateTaskChecklistName if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskChecklistName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistName(ctx, tmp) if err != nil { return nil, err @@ -4674,6 +4728,7 @@ func (ec *executionContext) field_Mutation_updateTaskComment_args(ctx context.Co args := map[string]interface{}{} var arg0 *UpdateTaskComment if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalOUpdateTaskComment2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskComment(ctx, tmp) if err != nil { return nil, err @@ -4688,6 +4743,7 @@ func (ec *executionContext) field_Mutation_updateTaskDescription_args(ctx contex args := map[string]interface{}{} var arg0 UpdateTaskDescriptionInput if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskDescriptionInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskDescriptionInput(ctx, tmp) if err != nil { return nil, err @@ -4702,6 +4758,7 @@ func (ec *executionContext) field_Mutation_updateTaskDueDate_args(ctx context.Co args := map[string]interface{}{} var arg0 UpdateTaskDueDate if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskDueDate2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskDueDate(ctx, tmp) if err != nil { return nil, err @@ -4716,6 +4773,7 @@ func (ec *executionContext) field_Mutation_updateTaskGroupLocation_args(ctx cont args := map[string]interface{}{} var arg0 NewTaskGroupLocation if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewTaskGroupLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTaskGroupLocation(ctx, tmp) if err != nil { return nil, err @@ -4730,6 +4788,7 @@ func (ec *executionContext) field_Mutation_updateTaskGroupName_args(ctx context. args := map[string]interface{}{} var arg0 UpdateTaskGroupName if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskGroupName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskGroupName(ctx, tmp) if err != nil { return nil, err @@ -4744,6 +4803,7 @@ func (ec *executionContext) field_Mutation_updateTaskLocation_args(ctx context.C args := map[string]interface{}{} var arg0 NewTaskLocation if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNNewTaskLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTaskLocation(ctx, tmp) if err != nil { return nil, err @@ -4758,6 +4818,7 @@ func (ec *executionContext) field_Mutation_updateTaskName_args(ctx context.Conte args := map[string]interface{}{} var arg0 UpdateTaskName if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTaskName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskName(ctx, tmp) if err != nil { return nil, err @@ -4772,6 +4833,7 @@ func (ec *executionContext) field_Mutation_updateTeamMemberRole_args(ctx context args := map[string]interface{}{} var arg0 UpdateTeamMemberRole if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateTeamMemberRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTeamMemberRole(ctx, tmp) if err != nil { return nil, err @@ -4786,6 +4848,7 @@ func (ec *executionContext) field_Mutation_updateUserInfo_args(ctx context.Conte args := map[string]interface{}{} var arg0 UpdateUserInfo if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateUserInfo2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserInfo(ctx, tmp) if err != nil { return nil, err @@ -4800,6 +4863,7 @@ func (ec *executionContext) field_Mutation_updateUserPassword_args(ctx context.C args := map[string]interface{}{} var arg0 UpdateUserPassword if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateUserPassword2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserPassword(ctx, tmp) if err != nil { return nil, err @@ -4814,6 +4878,7 @@ func (ec *executionContext) field_Mutation_updateUserRole_args(ctx context.Conte args := map[string]interface{}{} var arg0 UpdateUserRole if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNUpdateUserRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserRole(ctx, tmp) if err != nil { return nil, err @@ -4828,6 +4893,7 @@ func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err @@ -4842,6 +4908,7 @@ func (ec *executionContext) field_Query_findProject_args(ctx context.Context, ra args := map[string]interface{}{} var arg0 FindProject if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNFindProject2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindProject(ctx, tmp) if err != nil { return nil, err @@ -4856,6 +4923,7 @@ func (ec *executionContext) field_Query_findTask_args(ctx context.Context, rawAr args := map[string]interface{}{} var arg0 FindTask if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNFindTask2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindTask(ctx, tmp) if err != nil { return nil, err @@ -4870,6 +4938,7 @@ func (ec *executionContext) field_Query_findTeam_args(ctx context.Context, rawAr args := map[string]interface{}{} var arg0 FindTeam if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNFindTeam2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindTeam(ctx, tmp) if err != nil { return nil, err @@ -4884,6 +4953,7 @@ func (ec *executionContext) field_Query_findUser_args(ctx context.Context, rawAr args := map[string]interface{}{} var arg0 FindUser if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNFindUser2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindUser(ctx, tmp) if err != nil { return nil, err @@ -4898,6 +4968,7 @@ func (ec *executionContext) field_Query_myTasks_args(ctx context.Context, rawArg args := map[string]interface{}{} var arg0 MyTasks if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNMyTasks2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasks(ctx, tmp) if err != nil { return nil, err @@ -4912,6 +4983,7 @@ func (ec *executionContext) field_Query_projects_args(ctx context.Context, rawAr args := map[string]interface{}{} var arg0 *ProjectsFilter if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalOProjectsFilter2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectsFilter(ctx, tmp) if err != nil { return nil, err @@ -4926,6 +4998,7 @@ func (ec *executionContext) field_Query_searchMembers_args(ctx context.Context, args := map[string]interface{}{} var arg0 MemberSearchFilter if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) arg0, err = ec.unmarshalNMemberSearchFilter2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberSearchFilter(ctx, tmp) if err != nil { return nil, err @@ -4940,6 +5013,7 @@ func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, ra args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) if err != nil { return nil, err @@ -4954,6 +5028,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) if err != nil { return nil, err @@ -4979,10 +5054,11 @@ func (ec *executionContext) _CausedBy_id(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "CausedBy", - Field: field, - Args: nil, - IsMethod: false, + Object: "CausedBy", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5013,10 +5089,11 @@ func (ec *executionContext) _CausedBy_fullName(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "CausedBy", - Field: field, - Args: nil, - IsMethod: false, + Object: "CausedBy", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5047,10 +5124,11 @@ func (ec *executionContext) _CausedBy_profileIcon(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "CausedBy", - Field: field, - Args: nil, - IsMethod: false, + Object: "CausedBy", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5078,10 +5156,11 @@ func (ec *executionContext) _ChecklistBadge_complete(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "ChecklistBadge", - Field: field, - Args: nil, - IsMethod: false, + Object: "ChecklistBadge", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5112,10 +5191,11 @@ func (ec *executionContext) _ChecklistBadge_total(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "ChecklistBadge", - Field: field, - Args: nil, - IsMethod: false, + Object: "ChecklistBadge", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5146,10 +5226,11 @@ func (ec *executionContext) _CreateTaskCommentPayload_taskID(ctx context.Context } }() fc := &graphql.FieldContext{ - Object: "CreateTaskCommentPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "CreateTaskCommentPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5180,10 +5261,11 @@ func (ec *executionContext) _CreateTaskCommentPayload_comment(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "CreateTaskCommentPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "CreateTaskCommentPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5214,10 +5296,11 @@ func (ec *executionContext) _CreateTeamMemberPayload_team(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "CreateTeamMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "CreateTeamMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5248,10 +5331,11 @@ func (ec *executionContext) _CreateTeamMemberPayload_teamMember(ctx context.Cont } }() fc := &graphql.FieldContext{ - Object: "CreateTeamMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "CreateTeamMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5282,10 +5366,11 @@ func (ec *executionContext) _CreatedBy_id(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "CreatedBy", - Field: field, - Args: nil, - IsMethod: false, + Object: "CreatedBy", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5316,10 +5401,11 @@ func (ec *executionContext) _CreatedBy_fullName(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "CreatedBy", - Field: field, - Args: nil, - IsMethod: false, + Object: "CreatedBy", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5350,10 +5436,11 @@ func (ec *executionContext) _CreatedBy_profileIcon(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "CreatedBy", - Field: field, - Args: nil, - IsMethod: false, + Object: "CreatedBy", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5384,10 +5471,11 @@ func (ec *executionContext) _DeleteInvitedProjectMemberPayload_invitedMember(ctx } }() fc := &graphql.FieldContext{ - Object: "DeleteInvitedProjectMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteInvitedProjectMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5418,10 +5506,11 @@ func (ec *executionContext) _DeleteInvitedUserAccountPayload_invitedUser(ctx con } }() fc := &graphql.FieldContext{ - Object: "DeleteInvitedUserAccountPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteInvitedUserAccountPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5452,10 +5541,11 @@ func (ec *executionContext) _DeleteProjectMemberPayload_ok(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "DeleteProjectMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteProjectMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5486,10 +5576,11 @@ func (ec *executionContext) _DeleteProjectMemberPayload_member(ctx context.Conte } }() fc := &graphql.FieldContext{ - Object: "DeleteProjectMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteProjectMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5520,10 +5611,11 @@ func (ec *executionContext) _DeleteProjectMemberPayload_projectID(ctx context.Co } }() fc := &graphql.FieldContext{ - Object: "DeleteProjectMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteProjectMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5554,10 +5646,11 @@ func (ec *executionContext) _DeleteProjectPayload_ok(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "DeleteProjectPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteProjectPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5588,10 +5681,11 @@ func (ec *executionContext) _DeleteProjectPayload_project(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "DeleteProjectPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteProjectPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5622,10 +5716,11 @@ func (ec *executionContext) _DeleteTaskChecklistItemPayload_ok(ctx context.Conte } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskChecklistItemPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskChecklistItemPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5656,10 +5751,11 @@ func (ec *executionContext) _DeleteTaskChecklistItemPayload_taskChecklistItem(ct } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskChecklistItemPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskChecklistItemPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5690,10 +5786,11 @@ func (ec *executionContext) _DeleteTaskChecklistPayload_ok(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskChecklistPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskChecklistPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5724,10 +5821,11 @@ func (ec *executionContext) _DeleteTaskChecklistPayload_taskChecklist(ctx contex } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskChecklistPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskChecklistPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5758,10 +5856,11 @@ func (ec *executionContext) _DeleteTaskCommentPayload_taskID(ctx context.Context } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskCommentPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskCommentPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5792,10 +5891,11 @@ func (ec *executionContext) _DeleteTaskCommentPayload_commentID(ctx context.Cont } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskCommentPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskCommentPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5826,10 +5926,11 @@ func (ec *executionContext) _DeleteTaskGroupPayload_ok(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskGroupPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskGroupPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5860,10 +5961,11 @@ func (ec *executionContext) _DeleteTaskGroupPayload_affectedRows(ctx context.Con } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskGroupPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskGroupPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5894,10 +5996,11 @@ func (ec *executionContext) _DeleteTaskGroupPayload_taskGroup(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskGroupPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskGroupPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5928,10 +6031,11 @@ func (ec *executionContext) _DeleteTaskGroupTasksPayload_taskGroupID(ctx context } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskGroupTasksPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskGroupTasksPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5962,10 +6066,11 @@ func (ec *executionContext) _DeleteTaskGroupTasksPayload_tasks(ctx context.Conte } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskGroupTasksPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskGroupTasksPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -5996,10 +6101,11 @@ func (ec *executionContext) _DeleteTaskPayload_taskID(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "DeleteTaskPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTaskPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6030,10 +6136,11 @@ func (ec *executionContext) _DeleteTeamMemberPayload_teamID(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "DeleteTeamMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTeamMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6064,10 +6171,11 @@ func (ec *executionContext) _DeleteTeamMemberPayload_userID(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "DeleteTeamMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTeamMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6098,10 +6206,11 @@ func (ec *executionContext) _DeleteTeamMemberPayload_affectedProjects(ctx contex } }() fc := &graphql.FieldContext{ - Object: "DeleteTeamMemberPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTeamMemberPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6132,10 +6241,11 @@ func (ec *executionContext) _DeleteTeamPayload_ok(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "DeleteTeamPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTeamPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6166,10 +6276,11 @@ func (ec *executionContext) _DeleteTeamPayload_team(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "DeleteTeamPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTeamPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6200,10 +6311,11 @@ func (ec *executionContext) _DeleteTeamPayload_projects(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "DeleteTeamPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteTeamPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6234,10 +6346,11 @@ func (ec *executionContext) _DeleteUserAccountPayload_ok(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "DeleteUserAccountPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteUserAccountPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6268,10 +6381,11 @@ func (ec *executionContext) _DeleteUserAccountPayload_userAccount(ctx context.Co } }() fc := &graphql.FieldContext{ - Object: "DeleteUserAccountPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DeleteUserAccountPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6302,10 +6416,11 @@ func (ec *executionContext) _DuplicateTaskGroupPayload_taskGroup(ctx context.Con } }() fc := &graphql.FieldContext{ - Object: "DuplicateTaskGroupPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "DuplicateTaskGroupPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6336,10 +6451,11 @@ func (ec *executionContext) _InviteProjectMembersPayload_ok(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "InviteProjectMembersPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "InviteProjectMembersPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6370,10 +6486,11 @@ func (ec *executionContext) _InviteProjectMembersPayload_projectID(ctx context.C } }() fc := &graphql.FieldContext{ - Object: "InviteProjectMembersPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "InviteProjectMembersPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6404,10 +6521,11 @@ func (ec *executionContext) _InviteProjectMembersPayload_members(ctx context.Con } }() fc := &graphql.FieldContext{ - Object: "InviteProjectMembersPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "InviteProjectMembersPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6438,10 +6556,11 @@ func (ec *executionContext) _InviteProjectMembersPayload_invitedMembers(ctx cont } }() fc := &graphql.FieldContext{ - Object: "InviteProjectMembersPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "InviteProjectMembersPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6472,10 +6591,11 @@ func (ec *executionContext) _InvitedMember_email(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "InvitedMember", - Field: field, - Args: nil, - IsMethod: false, + Object: "InvitedMember", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6506,10 +6626,11 @@ func (ec *executionContext) _InvitedMember_invitedOn(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "InvitedMember", - Field: field, - Args: nil, - IsMethod: false, + Object: "InvitedMember", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6540,10 +6661,11 @@ func (ec *executionContext) _InvitedUserAccount_id(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "InvitedUserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "InvitedUserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6574,10 +6696,11 @@ func (ec *executionContext) _InvitedUserAccount_email(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "InvitedUserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "InvitedUserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6608,10 +6731,11 @@ func (ec *executionContext) _InvitedUserAccount_invitedOn(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "InvitedUserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "InvitedUserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6642,10 +6766,11 @@ func (ec *executionContext) _InvitedUserAccount_member(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "InvitedUserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "InvitedUserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6676,10 +6801,11 @@ func (ec *executionContext) _LabelColor_id(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "LabelColor", - Field: field, - Args: nil, - IsMethod: true, + Object: "LabelColor", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6710,10 +6836,11 @@ func (ec *executionContext) _LabelColor_name(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "LabelColor", - Field: field, - Args: nil, - IsMethod: false, + Object: "LabelColor", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6744,10 +6871,11 @@ func (ec *executionContext) _LabelColor_position(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "LabelColor", - Field: field, - Args: nil, - IsMethod: false, + Object: "LabelColor", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6778,10 +6906,11 @@ func (ec *executionContext) _LabelColor_colorHex(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "LabelColor", - Field: field, - Args: nil, - IsMethod: false, + Object: "LabelColor", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6812,10 +6941,11 @@ func (ec *executionContext) _MePayload_user(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "MePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "MePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6838,6 +6968,38 @@ func (ec *executionContext) _MePayload_user(ctx context.Context, field graphql.C return ec.marshalNUserAccount2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐUserAccount(ctx, field.Selections, res) } +func (ec *executionContext) _MePayload_organization(ctx context.Context, field graphql.CollectedField, obj *MePayload) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "MePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Organization, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*RoleCode) + fc.Result = res + return ec.marshalORoleCode2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, field.Selections, res) +} + func (ec *executionContext) _MePayload_teamRoles(ctx context.Context, field graphql.CollectedField, obj *MePayload) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -6846,10 +7008,11 @@ func (ec *executionContext) _MePayload_teamRoles(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "MePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "MePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6880,10 +7043,11 @@ func (ec *executionContext) _MePayload_projectRoles(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "MePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "MePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6914,10 +7078,11 @@ func (ec *executionContext) _Member_id(ctx context.Context, field graphql.Collec } }() fc := &graphql.FieldContext{ - Object: "Member", - Field: field, - Args: nil, - IsMethod: false, + Object: "Member", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6948,10 +7113,11 @@ func (ec *executionContext) _Member_role(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "Member", - Field: field, - Args: nil, - IsMethod: false, + Object: "Member", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -6982,10 +7148,11 @@ func (ec *executionContext) _Member_fullName(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "Member", - Field: field, - Args: nil, - IsMethod: false, + Object: "Member", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7016,10 +7183,11 @@ func (ec *executionContext) _Member_username(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "Member", - Field: field, - Args: nil, - IsMethod: false, + Object: "Member", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7050,10 +7218,11 @@ func (ec *executionContext) _Member_profileIcon(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "Member", - Field: field, - Args: nil, - IsMethod: false, + Object: "Member", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7084,10 +7253,11 @@ func (ec *executionContext) _Member_owned(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "Member", - Field: field, - Args: nil, - IsMethod: false, + Object: "Member", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7118,10 +7288,11 @@ func (ec *executionContext) _Member_member(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "Member", - Field: field, - Args: nil, - IsMethod: false, + Object: "Member", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7152,10 +7323,11 @@ func (ec *executionContext) _MemberList_teams(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "MemberList", - Field: field, - Args: nil, - IsMethod: false, + Object: "MemberList", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7186,10 +7358,11 @@ func (ec *executionContext) _MemberList_projects(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "MemberList", - Field: field, - Args: nil, - IsMethod: false, + Object: "MemberList", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7220,10 +7393,11 @@ func (ec *executionContext) _MemberSearchResult_similarity(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "MemberSearchResult", - Field: field, - Args: nil, - IsMethod: false, + Object: "MemberSearchResult", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7254,10 +7428,11 @@ func (ec *executionContext) _MemberSearchResult_id(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "MemberSearchResult", - Field: field, - Args: nil, - IsMethod: false, + Object: "MemberSearchResult", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7288,10 +7463,11 @@ func (ec *executionContext) _MemberSearchResult_user(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "MemberSearchResult", - Field: field, - Args: nil, - IsMethod: false, + Object: "MemberSearchResult", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7319,10 +7495,11 @@ func (ec *executionContext) _MemberSearchResult_status(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "MemberSearchResult", - Field: field, - Args: nil, - IsMethod: false, + Object: "MemberSearchResult", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7353,10 +7530,11 @@ func (ec *executionContext) _Mutation_createProject(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7393,7 +7571,7 @@ func (ec *executionContext) _Mutation_createProject(ctx context.Context, field g tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7426,10 +7604,11 @@ func (ec *executionContext) _Mutation_deleteProject(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7466,7 +7645,7 @@ func (ec *executionContext) _Mutation_deleteProject(ctx context.Context, field g tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7499,10 +7678,11 @@ func (ec *executionContext) _Mutation_updateProjectName(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7539,7 +7719,7 @@ func (ec *executionContext) _Mutation_updateProjectName(ctx context.Context, fie tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7572,10 +7752,11 @@ func (ec *executionContext) _Mutation_createProjectLabel(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7612,7 +7793,7 @@ func (ec *executionContext) _Mutation_createProjectLabel(ctx context.Context, fi tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7645,10 +7826,11 @@ func (ec *executionContext) _Mutation_deleteProjectLabel(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7685,7 +7867,7 @@ func (ec *executionContext) _Mutation_deleteProjectLabel(ctx context.Context, fi tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7718,10 +7900,11 @@ func (ec *executionContext) _Mutation_updateProjectLabel(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7758,7 +7941,7 @@ func (ec *executionContext) _Mutation_updateProjectLabel(ctx context.Context, fi tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7791,10 +7974,11 @@ func (ec *executionContext) _Mutation_updateProjectLabelName(ctx context.Context } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7831,7 +8015,7 @@ func (ec *executionContext) _Mutation_updateProjectLabelName(ctx context.Context tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7864,10 +8048,11 @@ func (ec *executionContext) _Mutation_updateProjectLabelColor(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7904,7 +8089,7 @@ func (ec *executionContext) _Mutation_updateProjectLabelColor(ctx context.Contex tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -7937,10 +8122,11 @@ func (ec *executionContext) _Mutation_inviteProjectMembers(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -7977,7 +8163,7 @@ func (ec *executionContext) _Mutation_inviteProjectMembers(ctx context.Context, tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8010,10 +8196,11 @@ func (ec *executionContext) _Mutation_deleteProjectMember(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8050,7 +8237,7 @@ func (ec *executionContext) _Mutation_deleteProjectMember(ctx context.Context, f tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8083,10 +8270,11 @@ func (ec *executionContext) _Mutation_updateProjectMemberRole(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8123,7 +8311,7 @@ func (ec *executionContext) _Mutation_updateProjectMemberRole(ctx context.Contex tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8156,10 +8344,11 @@ func (ec *executionContext) _Mutation_deleteInvitedProjectMember(ctx context.Con } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8196,7 +8385,7 @@ func (ec *executionContext) _Mutation_deleteInvitedProjectMember(ctx context.Con tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8229,10 +8418,11 @@ func (ec *executionContext) _Mutation_createTask(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8269,7 +8459,7 @@ func (ec *executionContext) _Mutation_createTask(ctx context.Context, field grap tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8302,10 +8492,11 @@ func (ec *executionContext) _Mutation_deleteTask(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8342,7 +8533,7 @@ func (ec *executionContext) _Mutation_deleteTask(ctx context.Context, field grap tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8375,10 +8566,11 @@ func (ec *executionContext) _Mutation_updateTaskDescription(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8415,7 +8607,7 @@ func (ec *executionContext) _Mutation_updateTaskDescription(ctx context.Context, tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8448,10 +8640,11 @@ func (ec *executionContext) _Mutation_updateTaskLocation(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8488,7 +8681,7 @@ func (ec *executionContext) _Mutation_updateTaskLocation(ctx context.Context, fi tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8521,10 +8714,11 @@ func (ec *executionContext) _Mutation_updateTaskName(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8561,7 +8755,7 @@ func (ec *executionContext) _Mutation_updateTaskName(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8594,10 +8788,11 @@ func (ec *executionContext) _Mutation_setTaskComplete(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8634,7 +8829,7 @@ func (ec *executionContext) _Mutation_setTaskComplete(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8667,10 +8862,11 @@ func (ec *executionContext) _Mutation_updateTaskDueDate(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8707,7 +8903,7 @@ func (ec *executionContext) _Mutation_updateTaskDueDate(ctx context.Context, fie tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8740,10 +8936,11 @@ func (ec *executionContext) _Mutation_assignTask(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8780,7 +8977,7 @@ func (ec *executionContext) _Mutation_assignTask(ctx context.Context, field grap tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8813,10 +9010,11 @@ func (ec *executionContext) _Mutation_unassignTask(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8853,7 +9051,7 @@ func (ec *executionContext) _Mutation_unassignTask(ctx context.Context, field gr tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8886,10 +9084,11 @@ func (ec *executionContext) _Mutation_createTaskChecklist(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8926,7 +9125,7 @@ func (ec *executionContext) _Mutation_createTaskChecklist(ctx context.Context, f tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -8959,10 +9158,11 @@ func (ec *executionContext) _Mutation_deleteTaskChecklist(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -8999,7 +9199,7 @@ func (ec *executionContext) _Mutation_deleteTaskChecklist(ctx context.Context, f tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9032,10 +9232,11 @@ func (ec *executionContext) _Mutation_updateTaskChecklistName(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9072,7 +9273,7 @@ func (ec *executionContext) _Mutation_updateTaskChecklistName(ctx context.Contex tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9105,10 +9306,11 @@ func (ec *executionContext) _Mutation_createTaskChecklistItem(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9145,7 +9347,7 @@ func (ec *executionContext) _Mutation_createTaskChecklistItem(ctx context.Contex tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9178,10 +9380,11 @@ func (ec *executionContext) _Mutation_updateTaskChecklistLocation(ctx context.Co } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9218,7 +9421,7 @@ func (ec *executionContext) _Mutation_updateTaskChecklistLocation(ctx context.Co tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9251,10 +9454,11 @@ func (ec *executionContext) _Mutation_updateTaskChecklistItemName(ctx context.Co } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9291,7 +9495,7 @@ func (ec *executionContext) _Mutation_updateTaskChecklistItemName(ctx context.Co tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9324,10 +9528,11 @@ func (ec *executionContext) _Mutation_setTaskChecklistItemComplete(ctx context.C } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9364,7 +9569,7 @@ func (ec *executionContext) _Mutation_setTaskChecklistItemComplete(ctx context.C tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9397,10 +9602,11 @@ func (ec *executionContext) _Mutation_deleteTaskChecklistItem(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9437,7 +9643,7 @@ func (ec *executionContext) _Mutation_deleteTaskChecklistItem(ctx context.Contex tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9470,10 +9676,11 @@ func (ec *executionContext) _Mutation_updateTaskChecklistItemLocation(ctx contex } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9510,7 +9717,7 @@ func (ec *executionContext) _Mutation_updateTaskChecklistItemLocation(ctx contex tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9543,10 +9750,11 @@ func (ec *executionContext) _Mutation_createTaskComment(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9583,7 +9791,7 @@ func (ec *executionContext) _Mutation_createTaskComment(ctx context.Context, fie tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9616,10 +9824,11 @@ func (ec *executionContext) _Mutation_deleteTaskComment(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9656,7 +9865,7 @@ func (ec *executionContext) _Mutation_deleteTaskComment(ctx context.Context, fie tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9689,10 +9898,11 @@ func (ec *executionContext) _Mutation_updateTaskComment(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9729,7 +9939,7 @@ func (ec *executionContext) _Mutation_updateTaskComment(ctx context.Context, fie tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9762,10 +9972,11 @@ func (ec *executionContext) _Mutation_createTaskGroup(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9802,7 +10013,7 @@ func (ec *executionContext) _Mutation_createTaskGroup(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9835,10 +10046,11 @@ func (ec *executionContext) _Mutation_updateTaskGroupLocation(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9875,7 +10087,7 @@ func (ec *executionContext) _Mutation_updateTaskGroupLocation(ctx context.Contex tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9908,10 +10120,11 @@ func (ec *executionContext) _Mutation_updateTaskGroupName(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -9948,7 +10161,7 @@ func (ec *executionContext) _Mutation_updateTaskGroupName(ctx context.Context, f tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -9981,10 +10194,11 @@ func (ec *executionContext) _Mutation_deleteTaskGroup(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10021,7 +10235,7 @@ func (ec *executionContext) _Mutation_deleteTaskGroup(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10054,10 +10268,11 @@ func (ec *executionContext) _Mutation_duplicateTaskGroup(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10094,7 +10309,7 @@ func (ec *executionContext) _Mutation_duplicateTaskGroup(ctx context.Context, fi tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10127,10 +10342,11 @@ func (ec *executionContext) _Mutation_sortTaskGroup(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10167,7 +10383,7 @@ func (ec *executionContext) _Mutation_sortTaskGroup(ctx context.Context, field g tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10200,10 +10416,11 @@ func (ec *executionContext) _Mutation_deleteTaskGroupTasks(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10240,7 +10457,7 @@ func (ec *executionContext) _Mutation_deleteTaskGroupTasks(ctx context.Context, tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10273,10 +10490,11 @@ func (ec *executionContext) _Mutation_addTaskLabel(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10313,7 +10531,7 @@ func (ec *executionContext) _Mutation_addTaskLabel(ctx context.Context, field gr tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10346,10 +10564,11 @@ func (ec *executionContext) _Mutation_removeTaskLabel(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10386,7 +10605,7 @@ func (ec *executionContext) _Mutation_removeTaskLabel(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10419,10 +10638,11 @@ func (ec *executionContext) _Mutation_toggleTaskLabel(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10459,7 +10679,7 @@ func (ec *executionContext) _Mutation_toggleTaskLabel(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10492,10 +10712,11 @@ func (ec *executionContext) _Mutation_deleteTeam(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10532,7 +10753,7 @@ func (ec *executionContext) _Mutation_deleteTeam(ctx context.Context, field grap tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10565,10 +10786,11 @@ func (ec *executionContext) _Mutation_createTeam(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10605,7 +10827,7 @@ func (ec *executionContext) _Mutation_createTeam(ctx context.Context, field grap tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10638,10 +10860,11 @@ func (ec *executionContext) _Mutation_createTeamMember(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10678,7 +10901,7 @@ func (ec *executionContext) _Mutation_createTeamMember(ctx context.Context, fiel tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10711,10 +10934,11 @@ func (ec *executionContext) _Mutation_updateTeamMemberRole(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10751,7 +10975,7 @@ func (ec *executionContext) _Mutation_updateTeamMemberRole(ctx context.Context, tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10784,10 +11008,11 @@ func (ec *executionContext) _Mutation_deleteTeamMember(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10824,7 +11049,7 @@ func (ec *executionContext) _Mutation_deleteTeamMember(ctx context.Context, fiel tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10849,47 +11074,6 @@ func (ec *executionContext) _Mutation_deleteTeamMember(ctx context.Context, fiel return ec.marshalNDeleteTeamMemberPayload2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTeamMemberPayload(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createRefreshToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_createRefreshToken_args(ctx, rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - fc.Args = args - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateRefreshToken(rctx, args["input"].(NewRefreshToken)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*db.RefreshToken) - fc.Result = res - return ec.marshalNRefreshToken2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐRefreshToken(ctx, field.Selections, res) -} - func (ec *executionContext) _Mutation_createUserAccount(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -10898,10 +11082,11 @@ func (ec *executionContext) _Mutation_createUserAccount(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -10938,7 +11123,7 @@ func (ec *executionContext) _Mutation_createUserAccount(ctx context.Context, fie tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -10971,10 +11156,11 @@ func (ec *executionContext) _Mutation_deleteUserAccount(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11011,7 +11197,7 @@ func (ec *executionContext) _Mutation_deleteUserAccount(ctx context.Context, fie tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -11044,10 +11230,11 @@ func (ec *executionContext) _Mutation_deleteInvitedUserAccount(ctx context.Conte } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11084,7 +11271,7 @@ func (ec *executionContext) _Mutation_deleteInvitedUserAccount(ctx context.Conte tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -11117,10 +11304,11 @@ func (ec *executionContext) _Mutation_logoutUser(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11158,10 +11346,11 @@ func (ec *executionContext) _Mutation_clearProfileAvatar(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11192,10 +11381,11 @@ func (ec *executionContext) _Mutation_updateUserPassword(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11233,10 +11423,11 @@ func (ec *executionContext) _Mutation_updateUserRole(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11273,7 +11464,7 @@ func (ec *executionContext) _Mutation_updateUserRole(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -11306,10 +11497,11 @@ func (ec *executionContext) _Mutation_updateUserInfo(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11346,7 +11538,7 @@ func (ec *executionContext) _Mutation_updateUserInfo(ctx context.Context, field tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -11379,10 +11571,11 @@ func (ec *executionContext) _MyTasksPayload_tasks(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "MyTasksPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "MyTasksPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11413,10 +11606,11 @@ func (ec *executionContext) _MyTasksPayload_projects(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "MyTasksPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "MyTasksPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11447,10 +11641,11 @@ func (ec *executionContext) _Notification_id(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "Notification", - Field: field, - Args: nil, - IsMethod: true, + Object: "Notification", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11481,10 +11676,11 @@ func (ec *executionContext) _Notification_entity(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Notification", - Field: field, - Args: nil, - IsMethod: true, + Object: "Notification", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11515,10 +11711,11 @@ func (ec *executionContext) _Notification_actionType(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "Notification", - Field: field, - Args: nil, - IsMethod: true, + Object: "Notification", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11549,10 +11746,11 @@ func (ec *executionContext) _Notification_actor(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "Notification", - Field: field, - Args: nil, - IsMethod: true, + Object: "Notification", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11583,10 +11781,11 @@ func (ec *executionContext) _Notification_read(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "Notification", - Field: field, - Args: nil, - IsMethod: false, + Object: "Notification", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11617,10 +11816,11 @@ func (ec *executionContext) _Notification_createdAt(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "Notification", - Field: field, - Args: nil, - IsMethod: true, + Object: "Notification", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11651,10 +11851,11 @@ func (ec *executionContext) _NotificationActor_id(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "NotificationActor", - Field: field, - Args: nil, - IsMethod: false, + Object: "NotificationActor", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11685,10 +11886,11 @@ func (ec *executionContext) _NotificationActor_type(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "NotificationActor", - Field: field, - Args: nil, - IsMethod: false, + Object: "NotificationActor", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11719,10 +11921,11 @@ func (ec *executionContext) _NotificationActor_name(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "NotificationActor", - Field: field, - Args: nil, - IsMethod: false, + Object: "NotificationActor", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11753,10 +11956,11 @@ func (ec *executionContext) _NotificationEntity_id(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "NotificationEntity", - Field: field, - Args: nil, - IsMethod: false, + Object: "NotificationEntity", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11787,10 +11991,11 @@ func (ec *executionContext) _NotificationEntity_type(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "NotificationEntity", - Field: field, - Args: nil, - IsMethod: false, + Object: "NotificationEntity", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11821,10 +12026,11 @@ func (ec *executionContext) _NotificationEntity_name(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "NotificationEntity", - Field: field, - Args: nil, - IsMethod: false, + Object: "NotificationEntity", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11855,10 +12061,11 @@ func (ec *executionContext) _Organization_id(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "Organization", - Field: field, - Args: nil, - IsMethod: true, + Object: "Organization", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11889,10 +12096,11 @@ func (ec *executionContext) _Organization_name(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "Organization", - Field: field, - Args: nil, - IsMethod: false, + Object: "Organization", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11923,10 +12131,11 @@ func (ec *executionContext) _OwnedList_teams(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "OwnedList", - Field: field, - Args: nil, - IsMethod: false, + Object: "OwnedList", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11957,10 +12166,11 @@ func (ec *executionContext) _OwnedList_projects(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "OwnedList", - Field: field, - Args: nil, - IsMethod: false, + Object: "OwnedList", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -11991,10 +12201,11 @@ func (ec *executionContext) _OwnersList_projects(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "OwnersList", - Field: field, - Args: nil, - IsMethod: false, + Object: "OwnersList", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12025,10 +12236,11 @@ func (ec *executionContext) _OwnersList_teams(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "OwnersList", - Field: field, - Args: nil, - IsMethod: false, + Object: "OwnersList", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12059,10 +12271,11 @@ func (ec *executionContext) _ProfileIcon_url(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "ProfileIcon", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProfileIcon", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12090,10 +12303,11 @@ func (ec *executionContext) _ProfileIcon_initials(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "ProfileIcon", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProfileIcon", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12121,10 +12335,11 @@ func (ec *executionContext) _ProfileIcon_bgColor(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "ProfileIcon", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProfileIcon", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12152,10 +12367,11 @@ func (ec *executionContext) _Project_id(ctx context.Context, field graphql.Colle } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: true, + Object: "Project", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12186,10 +12402,11 @@ func (ec *executionContext) _Project_createdAt(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: false, + Object: "Project", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12220,10 +12437,11 @@ func (ec *executionContext) _Project_name(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: false, + Object: "Project", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12254,10 +12472,11 @@ func (ec *executionContext) _Project_team(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: true, + Object: "Project", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12285,10 +12504,11 @@ func (ec *executionContext) _Project_taskGroups(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: true, + Object: "Project", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12319,10 +12539,11 @@ func (ec *executionContext) _Project_members(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: true, + Object: "Project", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12353,10 +12574,11 @@ func (ec *executionContext) _Project_invitedMembers(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: true, + Object: "Project", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12379,6 +12601,41 @@ func (ec *executionContext) _Project_invitedMembers(ctx context.Context, field g return ec.marshalNInvitedMember2ᚕgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐInvitedMemberᚄ(ctx, field.Selections, res) } +func (ec *executionContext) _Project_permission(ctx context.Context, field graphql.CollectedField, obj *db.Project) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Project", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Project().Permission(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*ProjectPermission) + fc.Result = res + return ec.marshalNProjectPermission2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectPermission(ctx, field.Selections, res) +} + func (ec *executionContext) _Project_labels(ctx context.Context, field graphql.CollectedField, obj *db.Project) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -12387,10 +12644,11 @@ func (ec *executionContext) _Project_labels(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Project", - Field: field, - Args: nil, - IsMethod: true, + Object: "Project", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12421,10 +12679,11 @@ func (ec *executionContext) _ProjectLabel_id(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "ProjectLabel", - Field: field, - Args: nil, - IsMethod: true, + Object: "ProjectLabel", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12455,10 +12714,11 @@ func (ec *executionContext) _ProjectLabel_createdDate(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "ProjectLabel", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProjectLabel", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12489,10 +12749,11 @@ func (ec *executionContext) _ProjectLabel_labelColor(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "ProjectLabel", - Field: field, - Args: nil, - IsMethod: true, + Object: "ProjectLabel", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12523,10 +12784,11 @@ func (ec *executionContext) _ProjectLabel_name(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "ProjectLabel", - Field: field, - Args: nil, - IsMethod: true, + Object: "ProjectLabel", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12546,6 +12808,111 @@ func (ec *executionContext) _ProjectLabel_name(ctx context.Context, field graphq return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) _ProjectPermission_team(ctx context.Context, field graphql.CollectedField, obj *ProjectPermission) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "ProjectPermission", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Team, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(RoleCode) + fc.Result = res + return ec.marshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, field.Selections, res) +} + +func (ec *executionContext) _ProjectPermission_project(ctx context.Context, field graphql.CollectedField, obj *ProjectPermission) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "ProjectPermission", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Project, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(RoleCode) + fc.Result = res + return ec.marshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, field.Selections, res) +} + +func (ec *executionContext) _ProjectPermission_org(ctx context.Context, field graphql.CollectedField, obj *ProjectPermission) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "ProjectPermission", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Org, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(RoleCode) + fc.Result = res + return ec.marshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, field.Selections, res) +} + func (ec *executionContext) _ProjectRole_projectID(ctx context.Context, field graphql.CollectedField, obj *ProjectRole) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -12554,10 +12921,11 @@ func (ec *executionContext) _ProjectRole_projectID(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "ProjectRole", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProjectRole", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12588,10 +12956,11 @@ func (ec *executionContext) _ProjectRole_roleCode(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "ProjectRole", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProjectRole", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12622,10 +12991,11 @@ func (ec *executionContext) _ProjectTaskMapping_projectID(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "ProjectTaskMapping", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProjectTaskMapping", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12656,10 +13026,11 @@ func (ec *executionContext) _ProjectTaskMapping_taskID(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "ProjectTaskMapping", - Field: field, - Args: nil, - IsMethod: false, + Object: "ProjectTaskMapping", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12690,10 +13061,11 @@ func (ec *executionContext) _Query_organizations(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12724,10 +13096,11 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12758,10 +13131,11 @@ func (ec *executionContext) _Query_invitedUsers(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12792,10 +13166,11 @@ func (ec *executionContext) _Query_findUser(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12833,10 +13208,11 @@ func (ec *executionContext) _Query_findProject(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12873,7 +13249,7 @@ func (ec *executionContext) _Query_findProject(ctx context.Context, field graphq tmp, err := directive1(rctx) if err != nil { - return nil, err + return nil, graphql.ErrorOnPath(ctx, err) } if tmp == nil { return nil, nil @@ -12906,10 +13282,11 @@ func (ec *executionContext) _Query_findTask(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12947,10 +13324,11 @@ func (ec *executionContext) _Query_projects(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -12988,10 +13366,11 @@ func (ec *executionContext) _Query_findTeam(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13029,10 +13408,11 @@ func (ec *executionContext) _Query_teams(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13063,10 +13443,11 @@ func (ec *executionContext) _Query_myTasks(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13104,10 +13485,11 @@ func (ec *executionContext) _Query_labelColors(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13138,10 +13520,11 @@ func (ec *executionContext) _Query_taskGroups(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13172,10 +13555,11 @@ func (ec *executionContext) _Query_me(ctx context.Context, field graphql.Collect } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13206,10 +13590,11 @@ func (ec *executionContext) _Query_notifications(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13240,10 +13625,11 @@ func (ec *executionContext) _Query_searchMembers(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13281,10 +13667,11 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13319,10 +13706,11 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13342,142 +13730,6 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) _RefreshToken_id(ctx context.Context, field graphql.CollectedField, obj *db.RefreshToken) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "RefreshToken", - Field: field, - Args: nil, - IsMethod: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.RefreshToken().ID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uuid.UUID) - fc.Result = res - return ec.marshalNID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) -} - -func (ec *executionContext) _RefreshToken_userId(ctx context.Context, field graphql.CollectedField, obj *db.RefreshToken) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "RefreshToken", - Field: field, - Args: nil, - IsMethod: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.UserID, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uuid.UUID) - fc.Result = res - return ec.marshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) -} - -func (ec *executionContext) _RefreshToken_expiresAt(ctx context.Context, field graphql.CollectedField, obj *db.RefreshToken) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "RefreshToken", - Field: field, - Args: nil, - IsMethod: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.ExpiresAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) -} - -func (ec *executionContext) _RefreshToken_createdAt(ctx context.Context, field graphql.CollectedField, obj *db.RefreshToken) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "RefreshToken", - Field: field, - Args: nil, - IsMethod: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) -} - func (ec *executionContext) _Role_code(ctx context.Context, field graphql.CollectedField, obj *db.Role) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -13486,10 +13738,11 @@ func (ec *executionContext) _Role_code(ctx context.Context, field graphql.Collec } }() fc := &graphql.FieldContext{ - Object: "Role", - Field: field, - Args: nil, - IsMethod: false, + Object: "Role", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13520,10 +13773,11 @@ func (ec *executionContext) _Role_name(ctx context.Context, field graphql.Collec } }() fc := &graphql.FieldContext{ - Object: "Role", - Field: field, - Args: nil, - IsMethod: false, + Object: "Role", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13554,10 +13808,11 @@ func (ec *executionContext) _SortTaskGroupPayload_taskGroupID(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "SortTaskGroupPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "SortTaskGroupPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13588,10 +13843,11 @@ func (ec *executionContext) _SortTaskGroupPayload_tasks(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "SortTaskGroupPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "SortTaskGroupPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13622,10 +13878,11 @@ func (ec *executionContext) _Task_id(ctx context.Context, field graphql.Collecte } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13656,10 +13913,11 @@ func (ec *executionContext) _Task_taskGroup(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13690,10 +13948,11 @@ func (ec *executionContext) _Task_createdAt(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: false, + Object: "Task", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13724,10 +13983,11 @@ func (ec *executionContext) _Task_name(ctx context.Context, field graphql.Collec } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: false, + Object: "Task", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13758,10 +14018,11 @@ func (ec *executionContext) _Task_position(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: false, + Object: "Task", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13792,10 +14053,11 @@ func (ec *executionContext) _Task_description(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13823,10 +14085,11 @@ func (ec *executionContext) _Task_dueDate(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13854,10 +14117,11 @@ func (ec *executionContext) _Task_hasTime(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: false, + Object: "Task", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13888,10 +14152,11 @@ func (ec *executionContext) _Task_complete(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: false, + Object: "Task", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13922,10 +14187,11 @@ func (ec *executionContext) _Task_completedAt(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13953,10 +14219,11 @@ func (ec *executionContext) _Task_assigned(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -13987,10 +14254,11 @@ func (ec *executionContext) _Task_labels(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14021,10 +14289,11 @@ func (ec *executionContext) _Task_checklists(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14055,10 +14324,11 @@ func (ec *executionContext) _Task_badges(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14089,10 +14359,11 @@ func (ec *executionContext) _Task_activity(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14123,10 +14394,11 @@ func (ec *executionContext) _Task_comments(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "Task", - Field: field, - Args: nil, - IsMethod: true, + Object: "Task", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14157,10 +14429,11 @@ func (ec *executionContext) _TaskActivity_id(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "TaskActivity", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskActivity", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14191,10 +14464,11 @@ func (ec *executionContext) _TaskActivity_type(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "TaskActivity", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskActivity", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14225,10 +14499,11 @@ func (ec *executionContext) _TaskActivity_data(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "TaskActivity", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskActivity", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14259,10 +14534,11 @@ func (ec *executionContext) _TaskActivity_causedBy(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "TaskActivity", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskActivity", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14293,10 +14569,11 @@ func (ec *executionContext) _TaskActivity_createdAt(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "TaskActivity", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskActivity", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14327,10 +14604,11 @@ func (ec *executionContext) _TaskActivityData_name(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "TaskActivityData", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskActivityData", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14361,10 +14639,11 @@ func (ec *executionContext) _TaskActivityData_value(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "TaskActivityData", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskActivityData", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14395,10 +14674,11 @@ func (ec *executionContext) _TaskBadges_checklist(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "TaskBadges", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskBadges", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14426,10 +14706,11 @@ func (ec *executionContext) _TaskChecklist_id(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "TaskChecklist", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskChecklist", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14460,10 +14741,11 @@ func (ec *executionContext) _TaskChecklist_name(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "TaskChecklist", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskChecklist", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14494,10 +14776,11 @@ func (ec *executionContext) _TaskChecklist_position(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "TaskChecklist", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskChecklist", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14528,10 +14811,11 @@ func (ec *executionContext) _TaskChecklist_items(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "TaskChecklist", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskChecklist", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14562,10 +14846,11 @@ func (ec *executionContext) _TaskChecklistItem_id(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "TaskChecklistItem", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskChecklistItem", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14596,10 +14881,11 @@ func (ec *executionContext) _TaskChecklistItem_name(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "TaskChecklistItem", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskChecklistItem", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14630,10 +14916,11 @@ func (ec *executionContext) _TaskChecklistItem_taskChecklistID(ctx context.Conte } }() fc := &graphql.FieldContext{ - Object: "TaskChecklistItem", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskChecklistItem", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14664,10 +14951,11 @@ func (ec *executionContext) _TaskChecklistItem_complete(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "TaskChecklistItem", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskChecklistItem", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14698,10 +14986,11 @@ func (ec *executionContext) _TaskChecklistItem_position(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "TaskChecklistItem", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskChecklistItem", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14732,10 +15021,11 @@ func (ec *executionContext) _TaskChecklistItem_dueDate(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "TaskChecklistItem", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskChecklistItem", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14766,10 +15056,11 @@ func (ec *executionContext) _TaskComment_id(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "TaskComment", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskComment", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14800,10 +15091,11 @@ func (ec *executionContext) _TaskComment_createdAt(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "TaskComment", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskComment", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14834,10 +15126,11 @@ func (ec *executionContext) _TaskComment_updatedAt(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "TaskComment", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskComment", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14865,10 +15158,11 @@ func (ec *executionContext) _TaskComment_message(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "TaskComment", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskComment", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14899,10 +15193,11 @@ func (ec *executionContext) _TaskComment_createdBy(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "TaskComment", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskComment", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14933,10 +15228,11 @@ func (ec *executionContext) _TaskComment_pinned(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "TaskComment", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskComment", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -14967,10 +15263,11 @@ func (ec *executionContext) _TaskGroup_id(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "TaskGroup", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskGroup", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15001,10 +15298,11 @@ func (ec *executionContext) _TaskGroup_projectID(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "TaskGroup", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskGroup", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15035,10 +15333,11 @@ func (ec *executionContext) _TaskGroup_createdAt(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "TaskGroup", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskGroup", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15069,10 +15368,11 @@ func (ec *executionContext) _TaskGroup_name(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "TaskGroup", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskGroup", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15103,10 +15403,11 @@ func (ec *executionContext) _TaskGroup_position(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "TaskGroup", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskGroup", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15137,10 +15438,11 @@ func (ec *executionContext) _TaskGroup_tasks(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "TaskGroup", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskGroup", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15171,10 +15473,11 @@ func (ec *executionContext) _TaskLabel_id(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "TaskLabel", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskLabel", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15205,10 +15508,11 @@ func (ec *executionContext) _TaskLabel_projectLabel(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "TaskLabel", - Field: field, - Args: nil, - IsMethod: true, + Object: "TaskLabel", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15239,10 +15543,11 @@ func (ec *executionContext) _TaskLabel_assignedDate(ctx context.Context, field g } }() fc := &graphql.FieldContext{ - Object: "TaskLabel", - Field: field, - Args: nil, - IsMethod: false, + Object: "TaskLabel", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15273,10 +15578,11 @@ func (ec *executionContext) _Team_id(ctx context.Context, field graphql.Collecte } }() fc := &graphql.FieldContext{ - Object: "Team", - Field: field, - Args: nil, - IsMethod: true, + Object: "Team", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15307,10 +15613,11 @@ func (ec *executionContext) _Team_createdAt(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "Team", - Field: field, - Args: nil, - IsMethod: false, + Object: "Team", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15341,10 +15648,11 @@ func (ec *executionContext) _Team_name(ctx context.Context, field graphql.Collec } }() fc := &graphql.FieldContext{ - Object: "Team", - Field: field, - Args: nil, - IsMethod: false, + Object: "Team", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15367,6 +15675,41 @@ func (ec *executionContext) _Team_name(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } +func (ec *executionContext) _Team_permission(ctx context.Context, field graphql.CollectedField, obj *db.Team) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Team", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Team().Permission(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*TeamPermission) + fc.Result = res + return ec.marshalNTeamPermission2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTeamPermission(ctx, field.Selections, res) +} + func (ec *executionContext) _Team_members(ctx context.Context, field graphql.CollectedField, obj *db.Team) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -15375,10 +15718,11 @@ func (ec *executionContext) _Team_members(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "Team", - Field: field, - Args: nil, - IsMethod: true, + Object: "Team", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15401,6 +15745,76 @@ func (ec *executionContext) _Team_members(ctx context.Context, field graphql.Col return ec.marshalNMember2ᚕgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberᚄ(ctx, field.Selections, res) } +func (ec *executionContext) _TeamPermission_team(ctx context.Context, field graphql.CollectedField, obj *TeamPermission) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "TeamPermission", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Team, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(RoleCode) + fc.Result = res + return ec.marshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, field.Selections, res) +} + +func (ec *executionContext) _TeamPermission_org(ctx context.Context, field graphql.CollectedField, obj *TeamPermission) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "TeamPermission", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Org, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(RoleCode) + fc.Result = res + return ec.marshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, field.Selections, res) +} + func (ec *executionContext) _TeamRole_teamID(ctx context.Context, field graphql.CollectedField, obj *TeamRole) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -15409,10 +15823,11 @@ func (ec *executionContext) _TeamRole_teamID(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "TeamRole", - Field: field, - Args: nil, - IsMethod: false, + Object: "TeamRole", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15443,10 +15858,11 @@ func (ec *executionContext) _TeamRole_roleCode(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "TeamRole", - Field: field, - Args: nil, - IsMethod: false, + Object: "TeamRole", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15477,10 +15893,11 @@ func (ec *executionContext) _ToggleTaskLabelPayload_active(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "ToggleTaskLabelPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "ToggleTaskLabelPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15511,10 +15928,11 @@ func (ec *executionContext) _ToggleTaskLabelPayload_task(ctx context.Context, fi } }() fc := &graphql.FieldContext{ - Object: "ToggleTaskLabelPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "ToggleTaskLabelPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15545,10 +15963,11 @@ func (ec *executionContext) _UpdateProjectMemberRolePayload_ok(ctx context.Conte } }() fc := &graphql.FieldContext{ - Object: "UpdateProjectMemberRolePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateProjectMemberRolePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15579,10 +15998,11 @@ func (ec *executionContext) _UpdateProjectMemberRolePayload_member(ctx context.C } }() fc := &graphql.FieldContext{ - Object: "UpdateProjectMemberRolePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateProjectMemberRolePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15613,10 +16033,11 @@ func (ec *executionContext) _UpdateTaskChecklistItemLocationPayload_taskChecklis } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskChecklistItemLocationPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskChecklistItemLocationPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15647,10 +16068,11 @@ func (ec *executionContext) _UpdateTaskChecklistItemLocationPayload_prevChecklis } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskChecklistItemLocationPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskChecklistItemLocationPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15681,10 +16103,11 @@ func (ec *executionContext) _UpdateTaskChecklistItemLocationPayload_checklistIte } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskChecklistItemLocationPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskChecklistItemLocationPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15715,10 +16138,11 @@ func (ec *executionContext) _UpdateTaskChecklistLocationPayload_checklist(ctx co } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskChecklistLocationPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskChecklistLocationPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15749,10 +16173,11 @@ func (ec *executionContext) _UpdateTaskCommentPayload_taskID(ctx context.Context } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskCommentPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskCommentPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15783,10 +16208,11 @@ func (ec *executionContext) _UpdateTaskCommentPayload_comment(ctx context.Contex } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskCommentPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskCommentPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15817,10 +16243,11 @@ func (ec *executionContext) _UpdateTaskLocationPayload_previousTaskGroupID(ctx c } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskLocationPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskLocationPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15851,10 +16278,11 @@ func (ec *executionContext) _UpdateTaskLocationPayload_task(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "UpdateTaskLocationPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTaskLocationPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15885,10 +16313,11 @@ func (ec *executionContext) _UpdateTeamMemberRolePayload_ok(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "UpdateTeamMemberRolePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTeamMemberRolePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15919,10 +16348,11 @@ func (ec *executionContext) _UpdateTeamMemberRolePayload_teamID(ctx context.Cont } }() fc := &graphql.FieldContext{ - Object: "UpdateTeamMemberRolePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTeamMemberRolePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15953,10 +16383,11 @@ func (ec *executionContext) _UpdateTeamMemberRolePayload_member(ctx context.Cont } }() fc := &graphql.FieldContext{ - Object: "UpdateTeamMemberRolePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateTeamMemberRolePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -15987,10 +16418,11 @@ func (ec *executionContext) _UpdateUserInfoPayload_user(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "UpdateUserInfoPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateUserInfoPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16021,10 +16453,11 @@ func (ec *executionContext) _UpdateUserPasswordPayload_ok(ctx context.Context, f } }() fc := &graphql.FieldContext{ - Object: "UpdateUserPasswordPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateUserPasswordPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16055,10 +16488,11 @@ func (ec *executionContext) _UpdateUserPasswordPayload_user(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "UpdateUserPasswordPayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateUserPasswordPayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16089,10 +16523,11 @@ func (ec *executionContext) _UpdateUserRolePayload_user(ctx context.Context, fie } }() fc := &graphql.FieldContext{ - Object: "UpdateUserRolePayload", - Field: field, - Args: nil, - IsMethod: false, + Object: "UpdateUserRolePayload", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16123,10 +16558,11 @@ func (ec *executionContext) _UserAccount_id(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: true, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16157,10 +16593,11 @@ func (ec *executionContext) _UserAccount_email(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16191,10 +16628,11 @@ func (ec *executionContext) _UserAccount_createdAt(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16225,10 +16663,11 @@ func (ec *executionContext) _UserAccount_fullName(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16259,10 +16698,11 @@ func (ec *executionContext) _UserAccount_initials(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16293,10 +16733,11 @@ func (ec *executionContext) _UserAccount_bio(ctx context.Context, field graphql. } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16327,10 +16768,11 @@ func (ec *executionContext) _UserAccount_role(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: true, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16361,10 +16803,11 @@ func (ec *executionContext) _UserAccount_username(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: false, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16395,10 +16838,11 @@ func (ec *executionContext) _UserAccount_profileIcon(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: true, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16429,10 +16873,11 @@ func (ec *executionContext) _UserAccount_owned(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: true, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16463,10 +16908,11 @@ func (ec *executionContext) _UserAccount_member(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "UserAccount", - Field: field, - Args: nil, - IsMethod: true, + Object: "UserAccount", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16497,10 +16943,11 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16531,10 +16978,11 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16562,10 +17010,11 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16596,10 +17045,11 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16630,10 +17080,11 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql } }() fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: false, + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16664,10 +17115,11 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: false, + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16695,10 +17147,11 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: true, + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16729,10 +17182,11 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, } }() fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: true, + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16760,10 +17214,11 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16794,10 +17249,11 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16825,10 +17281,11 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16859,10 +17316,11 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col } }() fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16893,10 +17351,11 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16927,10 +17386,11 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16958,10 +17418,11 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -16992,10 +17453,11 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field } }() fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17023,10 +17485,11 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17057,10 +17520,11 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17088,10 +17552,11 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C } }() fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17122,10 +17587,11 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17156,10 +17622,11 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr } }() fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17187,10 +17654,11 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel } }() fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17218,10 +17686,11 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap } }() fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17252,10 +17721,11 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17286,10 +17756,11 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17317,10 +17788,11 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17348,10 +17820,11 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17386,10 +17859,11 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17417,10 +17891,11 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17448,10 +17923,11 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17486,10 +17962,11 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17517,10 +17994,11 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co } }() fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, } ctx = graphql.WithFieldContext(ctx, fc) @@ -17552,12 +18030,16 @@ func (ec *executionContext) unmarshalInputAddTaskLabelInput(ctx context.Context, switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "projectLabelID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectLabelID")) it.ProjectLabelID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17576,12 +18058,16 @@ func (ec *executionContext) unmarshalInputAssignTaskInput(ctx context.Context, o switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17600,18 +18086,24 @@ func (ec *executionContext) unmarshalInputCreateTaskChecklist(ctx context.Contex switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -17630,18 +18122,24 @@ func (ec *executionContext) unmarshalInputCreateTaskChecklistItem(ctx context.Co switch k { case "taskChecklistID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistID")) it.TaskChecklistID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -17660,12 +18158,16 @@ func (ec *executionContext) unmarshalInputCreateTaskComment(ctx context.Context, switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "message": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) it.Message, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -17684,12 +18186,16 @@ func (ec *executionContext) unmarshalInputCreateTeamMember(ctx context.Context, switch k { case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "teamID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamID")) it.TeamID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17708,12 +18214,16 @@ func (ec *executionContext) unmarshalInputDeleteInvitedProjectMember(ctx context switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "email": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email")) it.Email, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -17732,6 +18242,8 @@ func (ec *executionContext) unmarshalInputDeleteInvitedUserAccount(ctx context.C switch k { case "invitedUserID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("invitedUserID")) it.InvitedUserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17750,6 +18262,8 @@ func (ec *executionContext) unmarshalInputDeleteProject(ctx context.Context, obj switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17768,6 +18282,8 @@ func (ec *executionContext) unmarshalInputDeleteProjectLabel(ctx context.Context switch k { case "projectLabelID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectLabelID")) it.ProjectLabelID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17786,12 +18302,16 @@ func (ec *executionContext) unmarshalInputDeleteProjectMember(ctx context.Contex switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17810,6 +18330,8 @@ func (ec *executionContext) unmarshalInputDeleteTaskChecklist(ctx context.Contex switch k { case "taskChecklistID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistID")) it.TaskChecklistID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17828,6 +18350,8 @@ func (ec *executionContext) unmarshalInputDeleteTaskChecklistItem(ctx context.Co switch k { case "taskChecklistItemID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistItemID")) it.TaskChecklistItemID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17846,6 +18370,8 @@ func (ec *executionContext) unmarshalInputDeleteTaskComment(ctx context.Context, switch k { case "commentID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commentID")) it.CommentID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17864,6 +18390,8 @@ func (ec *executionContext) unmarshalInputDeleteTaskGroupInput(ctx context.Conte switch k { case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17882,6 +18410,8 @@ func (ec *executionContext) unmarshalInputDeleteTaskGroupTasks(ctx context.Conte switch k { case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17900,6 +18430,8 @@ func (ec *executionContext) unmarshalInputDeleteTaskInput(ctx context.Context, o switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17918,6 +18450,8 @@ func (ec *executionContext) unmarshalInputDeleteTeam(ctx context.Context, obj in switch k { case "teamID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamID")) it.TeamID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17936,18 +18470,24 @@ func (ec *executionContext) unmarshalInputDeleteTeamMember(ctx context.Context, switch k { case "teamID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamID")) it.TeamID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "newOwnerID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newOwnerID")) it.NewOwnerID, err = ec.unmarshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17966,12 +18506,16 @@ func (ec *executionContext) unmarshalInputDeleteUserAccount(ctx context.Context, switch k { case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "newOwnerID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newOwnerID")) it.NewOwnerID, err = ec.unmarshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -17990,24 +18534,32 @@ func (ec *executionContext) unmarshalInputDuplicateTaskGroup(ctx context.Context switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -18026,6 +18578,8 @@ func (ec *executionContext) unmarshalInputFindProject(ctx context.Context, obj i switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18044,6 +18598,8 @@ func (ec *executionContext) unmarshalInputFindTask(ctx context.Context, obj inte switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18062,6 +18618,8 @@ func (ec *executionContext) unmarshalInputFindTeam(ctx context.Context, obj inte switch k { case "teamID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamID")) it.TeamID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18080,6 +18638,8 @@ func (ec *executionContext) unmarshalInputFindUser(ctx context.Context, obj inte switch k { case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18098,12 +18658,16 @@ func (ec *executionContext) unmarshalInputInviteProjectMembers(ctx context.Conte switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "members": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("members")) it.Members, err = ec.unmarshalNMemberInvite2ᚕgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberInviteᚄ(ctx, v) if err != nil { return it, err @@ -18122,6 +18686,8 @@ func (ec *executionContext) unmarshalInputLogoutUser(ctx context.Context, obj in switch k { case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18140,12 +18706,16 @@ func (ec *executionContext) unmarshalInputMemberInvite(ctx context.Context, obj switch k { case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "email": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email")) it.Email, err = ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err @@ -18164,12 +18734,16 @@ func (ec *executionContext) unmarshalInputMemberSearchFilter(ctx context.Context switch k { case "searchFilter": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("searchFilter")) it.SearchFilter, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18188,12 +18762,16 @@ func (ec *executionContext) unmarshalInputMyTasks(ctx context.Context, obj inter switch k { case "status": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status")) it.Status, err = ec.unmarshalNMyTasksStatus2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasksStatus(ctx, v) if err != nil { return it, err } case "sort": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sort")) it.Sort, err = ec.unmarshalNMyTasksSort2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasksSort(ctx, v) if err != nil { return it, err @@ -18212,12 +18790,16 @@ func (ec *executionContext) unmarshalInputNewProject(ctx context.Context, obj in switch k { case "teamID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamID")) it.TeamID, err = ec.unmarshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18236,18 +18818,24 @@ func (ec *executionContext) unmarshalInputNewProjectLabel(ctx context.Context, o switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "labelColorID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelColorID")) it.LabelColorID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err @@ -18258,24 +18846,6 @@ func (ec *executionContext) unmarshalInputNewProjectLabel(ctx context.Context, o return it, nil } -func (ec *executionContext) unmarshalInputNewRefreshToken(ctx context.Context, obj interface{}) (NewRefreshToken, error) { - var it NewRefreshToken - var asMap = obj.(map[string]interface{}) - - for k, v := range asMap { - switch k { - case "userID": - var err error - it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) - if err != nil { - return it, err - } - } - } - - return it, nil -} - func (ec *executionContext) unmarshalInputNewTask(ctx context.Context, obj interface{}) (NewTask, error) { var it NewTask var asMap = obj.(map[string]interface{}) @@ -18284,24 +18854,32 @@ func (ec *executionContext) unmarshalInputNewTask(ctx context.Context, obj inter switch k { case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err } case "assigned": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("assigned")) it.Assigned, err = ec.unmarshalOUUID2ᚕgithubᚗcomᚋgoogleᚋuuidᚐUUIDᚄ(ctx, v) if err != nil { return it, err @@ -18320,18 +18898,24 @@ func (ec *executionContext) unmarshalInputNewTaskGroup(ctx context.Context, obj switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -18350,12 +18934,16 @@ func (ec *executionContext) unmarshalInputNewTaskGroupLocation(ctx context.Conte switch k { case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -18374,18 +18962,24 @@ func (ec *executionContext) unmarshalInputNewTaskLocation(ctx context.Context, o switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -18404,12 +18998,16 @@ func (ec *executionContext) unmarshalInputNewTeam(ctx context.Context, obj inter switch k { case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "organizationID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("organizationID")) it.OrganizationID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18428,36 +19026,48 @@ func (ec *executionContext) unmarshalInputNewUserAccount(ctx context.Context, ob switch k { case "username": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username")) it.Username, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "email": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email")) it.Email, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "fullName": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fullName")) it.FullName, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "initials": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("initials")) it.Initials, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "password": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password")) it.Password, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "roleCode": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("roleCode")) it.RoleCode, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18476,6 +19086,8 @@ func (ec *executionContext) unmarshalInputProjectsFilter(ctx context.Context, ob switch k { case "teamID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamID")) it.TeamID, err = ec.unmarshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18494,12 +19106,16 @@ func (ec *executionContext) unmarshalInputRemoveTaskLabelInput(ctx context.Conte switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "taskLabelID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskLabelID")) it.TaskLabelID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18518,12 +19134,16 @@ func (ec *executionContext) unmarshalInputSetTaskChecklistItemComplete(ctx conte switch k { case "taskChecklistItemID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistItemID")) it.TaskChecklistItemID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "complete": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("complete")) it.Complete, err = ec.unmarshalNBoolean2bool(ctx, v) if err != nil { return it, err @@ -18542,12 +19162,16 @@ func (ec *executionContext) unmarshalInputSetTaskComplete(ctx context.Context, o switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "complete": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("complete")) it.Complete, err = ec.unmarshalNBoolean2bool(ctx, v) if err != nil { return it, err @@ -18566,12 +19190,16 @@ func (ec *executionContext) unmarshalInputSortTaskGroup(ctx context.Context, obj switch k { case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "tasks": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tasks")) it.Tasks, err = ec.unmarshalNTaskPositionUpdate2ᚕgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTaskPositionUpdateᚄ(ctx, v) if err != nil { return it, err @@ -18590,12 +19218,16 @@ func (ec *executionContext) unmarshalInputTaskPositionUpdate(ctx context.Context switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -18614,12 +19246,16 @@ func (ec *executionContext) unmarshalInputToggleTaskLabelInput(ctx context.Conte switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "projectLabelID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectLabelID")) it.ProjectLabelID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18638,12 +19274,16 @@ func (ec *executionContext) unmarshalInputUnassignTaskInput(ctx context.Context, switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18662,18 +19302,24 @@ func (ec *executionContext) unmarshalInputUpdateProjectLabel(ctx context.Context switch k { case "projectLabelID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectLabelID")) it.ProjectLabelID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "labelColorID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelColorID")) it.LabelColorID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18692,12 +19338,16 @@ func (ec *executionContext) unmarshalInputUpdateProjectLabelColor(ctx context.Co switch k { case "projectLabelID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectLabelID")) it.ProjectLabelID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "labelColorID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelColorID")) it.LabelColorID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err @@ -18716,12 +19366,16 @@ func (ec *executionContext) unmarshalInputUpdateProjectLabelName(ctx context.Con switch k { case "projectLabelID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectLabelID")) it.ProjectLabelID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18740,18 +19394,24 @@ func (ec *executionContext) unmarshalInputUpdateProjectMemberRole(ctx context.Co switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "roleCode": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("roleCode")) it.RoleCode, err = ec.unmarshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, v) if err != nil { return it, err @@ -18770,12 +19430,16 @@ func (ec *executionContext) unmarshalInputUpdateProjectName(ctx context.Context, switch k { case "projectID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID")) it.ProjectID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18794,18 +19458,24 @@ func (ec *executionContext) unmarshalInputUpdateTaskChecklistItemLocation(ctx co switch k { case "taskChecklistID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistID")) it.TaskChecklistID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "taskChecklistItemID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistItemID")) it.TaskChecklistItemID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -18824,12 +19494,16 @@ func (ec *executionContext) unmarshalInputUpdateTaskChecklistItemName(ctx contex switch k { case "taskChecklistItemID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistItemID")) it.TaskChecklistItemID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18848,12 +19522,16 @@ func (ec *executionContext) unmarshalInputUpdateTaskChecklistLocation(ctx contex switch k { case "taskChecklistID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistID")) it.TaskChecklistID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "position": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("position")) it.Position, err = ec.unmarshalNFloat2float64(ctx, v) if err != nil { return it, err @@ -18872,12 +19550,16 @@ func (ec *executionContext) unmarshalInputUpdateTaskChecklistName(ctx context.Co switch k { case "taskChecklistID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskChecklistID")) it.TaskChecklistID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18896,12 +19578,16 @@ func (ec *executionContext) unmarshalInputUpdateTaskComment(ctx context.Context, switch k { case "commentID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commentID")) it.CommentID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "message": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) it.Message, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18920,12 +19606,16 @@ func (ec *executionContext) unmarshalInputUpdateTaskDescriptionInput(ctx context switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "description": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) it.Description, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18944,18 +19634,24 @@ func (ec *executionContext) unmarshalInputUpdateTaskDueDate(ctx context.Context, switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "hasTime": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTime")) it.HasTime, err = ec.unmarshalNBoolean2bool(ctx, v) if err != nil { return it, err } case "dueDate": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dueDate")) it.DueDate, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) if err != nil { return it, err @@ -18974,12 +19670,16 @@ func (ec *executionContext) unmarshalInputUpdateTaskGroupName(ctx context.Contex switch k { case "taskGroupID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskGroupID")) it.TaskGroupID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -18998,12 +19698,16 @@ func (ec *executionContext) unmarshalInputUpdateTaskName(ctx context.Context, ob switch k { case "taskID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskID")) it.TaskID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -19022,18 +19726,24 @@ func (ec *executionContext) unmarshalInputUpdateTeamMemberRole(ctx context.Conte switch k { case "teamID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamID")) it.TeamID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "roleCode": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("roleCode")) it.RoleCode, err = ec.unmarshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, v) if err != nil { return it, err @@ -19052,24 +19762,32 @@ func (ec *executionContext) unmarshalInputUpdateUserInfo(ctx context.Context, ob switch k { case "name": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) it.Name, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "initials": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("initials")) it.Initials, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "email": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email")) it.Email, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } case "bio": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bio")) it.Bio, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -19088,12 +19806,16 @@ func (ec *executionContext) unmarshalInputUpdateUserPassword(ctx context.Context switch k { case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "password": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password")) it.Password, err = ec.unmarshalNString2string(ctx, v) if err != nil { return it, err @@ -19112,12 +19834,16 @@ func (ec *executionContext) unmarshalInputUpdateUserRole(ctx context.Context, ob switch k { case "userID": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userID")) it.UserID, err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) if err != nil { return it, err } case "roleCode": var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("roleCode")) it.RoleCode, err = ec.unmarshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx, v) if err != nil { return it, err @@ -19934,6 +20660,8 @@ func (ec *executionContext) _MePayload(ctx context.Context, sel ast.SelectionSet if out.Values[i] == graphql.Null { invalids++ } + case "organization": + out.Values[i] = ec._MePayload_organization(ctx, field, obj) case "teamRoles": out.Values[i] = ec._MePayload_teamRoles(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -20338,11 +21066,6 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { invalids++ } - case "createRefreshToken": - out.Values[i] = ec._Mutation_createRefreshToken(ctx, field) - if out.Values[i] == graphql.Null { - invalids++ - } case "createUserAccount": out.Values[i] = ec._Mutation_createUserAccount(ctx, field) if out.Values[i] == graphql.Null { @@ -20818,6 +21541,20 @@ func (ec *executionContext) _Project(ctx context.Context, sel ast.SelectionSet, } return res }) + case "permission": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Project_permission(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + }) case "labels": field := field out.Concurrently(i, func() (res graphql.Marshaler) { @@ -20909,6 +21646,43 @@ func (ec *executionContext) _ProjectLabel(ctx context.Context, sel ast.Selection return out } +var projectPermissionImplementors = []string{"ProjectPermission"} + +func (ec *executionContext) _ProjectPermission(ctx context.Context, sel ast.SelectionSet, obj *ProjectPermission) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, projectPermissionImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("ProjectPermission") + case "team": + out.Values[i] = ec._ProjectPermission_team(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "project": + out.Values[i] = ec._ProjectPermission_project(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "org": + out.Values[i] = ec._ProjectPermission_org(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var projectRoleImplementors = []string{"ProjectRole"} func (ec *executionContext) _ProjectRole(ctx context.Context, sel ast.SelectionSet, obj *ProjectRole) graphql.Marshaler { @@ -21213,57 +21987,6 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } -var refreshTokenImplementors = []string{"RefreshToken"} - -func (ec *executionContext) _RefreshToken(ctx context.Context, sel ast.SelectionSet, obj *db.RefreshToken) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, refreshTokenImplementors) - - out := graphql.NewFieldSet(fields) - var invalids uint32 - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("RefreshToken") - case "id": - field := field - out.Concurrently(i, func() (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._RefreshToken_id(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&invalids, 1) - } - return res - }) - case "userId": - out.Values[i] = ec._RefreshToken_userId(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) - } - case "expiresAt": - out.Values[i] = ec._RefreshToken_expiresAt(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) - } - case "createdAt": - out.Values[i] = ec._RefreshToken_createdAt(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch() - if invalids > 0 { - return graphql.Null - } - return out -} - var roleImplementors = []string{"Role"} func (ec *executionContext) _Role(ctx context.Context, sel ast.SelectionSet, obj *db.Role) graphql.Marshaler { @@ -22034,6 +22757,20 @@ func (ec *executionContext) _Team(ctx context.Context, sel ast.SelectionSet, obj if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } + case "permission": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Team_permission(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + }) case "members": field := field out.Concurrently(i, func() (res graphql.Marshaler) { @@ -22059,6 +22796,38 @@ func (ec *executionContext) _Team(ctx context.Context, sel ast.SelectionSet, obj return out } +var teamPermissionImplementors = []string{"TeamPermission"} + +func (ec *executionContext) _TeamPermission(ctx context.Context, sel ast.SelectionSet, obj *TeamPermission) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamPermissionImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamPermission") + case "team": + out.Values[i] = ec._TeamPermission_team(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "org": + out.Values[i] = ec._TeamPermission_org(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var teamRoleImplementors = []string{"TeamRole"} func (ec *executionContext) _TeamRole(ctx context.Context, sel ast.SelectionSet, obj *TeamRole) graphql.Marshaler { @@ -22775,7 +23544,8 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o func (ec *executionContext) unmarshalNActionLevel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActionLevel(ctx context.Context, v interface{}) (ActionLevel, error) { var res ActionLevel - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNActionLevel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActionLevel(ctx context.Context, sel ast.SelectionSet, v ActionLevel) graphql.Marshaler { @@ -22784,7 +23554,8 @@ func (ec *executionContext) marshalNActionLevel2githubᚗcomᚋjordanknottᚋtas func (ec *executionContext) unmarshalNActionType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActionType(ctx context.Context, v interface{}) (ActionType, error) { var res ActionType - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNActionType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActionType(ctx context.Context, sel ast.SelectionSet, v ActionType) graphql.Marshaler { @@ -22793,7 +23564,8 @@ func (ec *executionContext) marshalNActionType2githubᚗcomᚋjordanknottᚋtask func (ec *executionContext) unmarshalNActivityType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActivityType(ctx context.Context, v interface{}) (ActivityType, error) { var res ActivityType - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNActivityType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActivityType(ctx context.Context, sel ast.SelectionSet, v ActivityType) graphql.Marshaler { @@ -22802,7 +23574,8 @@ func (ec *executionContext) marshalNActivityType2githubᚗcomᚋjordanknottᚋta func (ec *executionContext) unmarshalNActorType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActorType(ctx context.Context, v interface{}) (ActorType, error) { var res ActorType - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNActorType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐActorType(ctx context.Context, sel ast.SelectionSet, v ActorType) graphql.Marshaler { @@ -22810,7 +23583,8 @@ func (ec *executionContext) marshalNActorType2githubᚗcomᚋjordanknottᚋtaskc } func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { - return graphql.UnmarshalBoolean(v) + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { @@ -22838,11 +23612,13 @@ func (ec *executionContext) marshalNCausedBy2ᚖgithubᚗcomᚋjordanknottᚋtas } func (ec *executionContext) unmarshalNCreateTaskChecklist2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskChecklist(ctx context.Context, v interface{}) (CreateTaskChecklist, error) { - return ec.unmarshalInputCreateTaskChecklist(ctx, v) + res, err := ec.unmarshalInputCreateTaskChecklist(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNCreateTaskChecklistItem2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskChecklistItem(ctx context.Context, v interface{}) (CreateTaskChecklistItem, error) { - return ec.unmarshalInputCreateTaskChecklistItem(ctx, v) + res, err := ec.unmarshalInputCreateTaskChecklistItem(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNCreateTaskCommentPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskCommentPayload(ctx context.Context, sel ast.SelectionSet, v CreateTaskCommentPayload) graphql.Marshaler { @@ -22860,7 +23636,8 @@ func (ec *executionContext) marshalNCreateTaskCommentPayload2ᚖgithubᚗcomᚋj } func (ec *executionContext) unmarshalNCreateTeamMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTeamMember(ctx context.Context, v interface{}) (CreateTeamMember, error) { - return ec.unmarshalInputCreateTeamMember(ctx, v) + res, err := ec.unmarshalInputCreateTeamMember(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNCreateTeamMemberPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTeamMemberPayload(ctx context.Context, sel ast.SelectionSet, v CreateTeamMemberPayload) graphql.Marshaler { @@ -22892,7 +23669,8 @@ func (ec *executionContext) marshalNCreatedBy2ᚖgithubᚗcomᚋjordanknottᚋta } func (ec *executionContext) unmarshalNDeleteInvitedProjectMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteInvitedProjectMember(ctx context.Context, v interface{}) (DeleteInvitedProjectMember, error) { - return ec.unmarshalInputDeleteInvitedProjectMember(ctx, v) + res, err := ec.unmarshalInputDeleteInvitedProjectMember(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteInvitedProjectMemberPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteInvitedProjectMemberPayload(ctx context.Context, sel ast.SelectionSet, v DeleteInvitedProjectMemberPayload) graphql.Marshaler { @@ -22910,7 +23688,8 @@ func (ec *executionContext) marshalNDeleteInvitedProjectMemberPayload2ᚖgithub } func (ec *executionContext) unmarshalNDeleteInvitedUserAccount2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteInvitedUserAccount(ctx context.Context, v interface{}) (DeleteInvitedUserAccount, error) { - return ec.unmarshalInputDeleteInvitedUserAccount(ctx, v) + res, err := ec.unmarshalInputDeleteInvitedUserAccount(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteInvitedUserAccountPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteInvitedUserAccountPayload(ctx context.Context, sel ast.SelectionSet, v DeleteInvitedUserAccountPayload) graphql.Marshaler { @@ -22928,15 +23707,18 @@ func (ec *executionContext) marshalNDeleteInvitedUserAccountPayload2ᚖgithubᚗ } func (ec *executionContext) unmarshalNDeleteProject2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteProject(ctx context.Context, v interface{}) (DeleteProject, error) { - return ec.unmarshalInputDeleteProject(ctx, v) + res, err := ec.unmarshalInputDeleteProject(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNDeleteProjectLabel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteProjectLabel(ctx context.Context, v interface{}) (DeleteProjectLabel, error) { - return ec.unmarshalInputDeleteProjectLabel(ctx, v) + res, err := ec.unmarshalInputDeleteProjectLabel(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNDeleteProjectMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteProjectMember(ctx context.Context, v interface{}) (DeleteProjectMember, error) { - return ec.unmarshalInputDeleteProjectMember(ctx, v) + res, err := ec.unmarshalInputDeleteProjectMember(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteProjectMemberPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteProjectMemberPayload(ctx context.Context, sel ast.SelectionSet, v DeleteProjectMemberPayload) graphql.Marshaler { @@ -22968,11 +23750,13 @@ func (ec *executionContext) marshalNDeleteProjectPayload2ᚖgithubᚗcomᚋjorda } func (ec *executionContext) unmarshalNDeleteTaskChecklist2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskChecklist(ctx context.Context, v interface{}) (DeleteTaskChecklist, error) { - return ec.unmarshalInputDeleteTaskChecklist(ctx, v) + res, err := ec.unmarshalInputDeleteTaskChecklist(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNDeleteTaskChecklistItem2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskChecklistItem(ctx context.Context, v interface{}) (DeleteTaskChecklistItem, error) { - return ec.unmarshalInputDeleteTaskChecklistItem(ctx, v) + res, err := ec.unmarshalInputDeleteTaskChecklistItem(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteTaskChecklistItemPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskChecklistItemPayload(ctx context.Context, sel ast.SelectionSet, v DeleteTaskChecklistItemPayload) graphql.Marshaler { @@ -23018,7 +23802,8 @@ func (ec *executionContext) marshalNDeleteTaskCommentPayload2ᚖgithubᚗcomᚋj } func (ec *executionContext) unmarshalNDeleteTaskGroupInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskGroupInput(ctx context.Context, v interface{}) (DeleteTaskGroupInput, error) { - return ec.unmarshalInputDeleteTaskGroupInput(ctx, v) + res, err := ec.unmarshalInputDeleteTaskGroupInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteTaskGroupPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskGroupPayload(ctx context.Context, sel ast.SelectionSet, v DeleteTaskGroupPayload) graphql.Marshaler { @@ -23036,7 +23821,8 @@ func (ec *executionContext) marshalNDeleteTaskGroupPayload2ᚖgithubᚗcomᚋjor } func (ec *executionContext) unmarshalNDeleteTaskGroupTasks2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskGroupTasks(ctx context.Context, v interface{}) (DeleteTaskGroupTasks, error) { - return ec.unmarshalInputDeleteTaskGroupTasks(ctx, v) + res, err := ec.unmarshalInputDeleteTaskGroupTasks(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteTaskGroupTasksPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskGroupTasksPayload(ctx context.Context, sel ast.SelectionSet, v DeleteTaskGroupTasksPayload) graphql.Marshaler { @@ -23054,7 +23840,8 @@ func (ec *executionContext) marshalNDeleteTaskGroupTasksPayload2ᚖgithubᚗcom } func (ec *executionContext) unmarshalNDeleteTaskInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskInput(ctx context.Context, v interface{}) (DeleteTaskInput, error) { - return ec.unmarshalInputDeleteTaskInput(ctx, v) + res, err := ec.unmarshalInputDeleteTaskInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteTaskPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskPayload(ctx context.Context, sel ast.SelectionSet, v DeleteTaskPayload) graphql.Marshaler { @@ -23072,11 +23859,13 @@ func (ec *executionContext) marshalNDeleteTaskPayload2ᚖgithubᚗcomᚋjordankn } func (ec *executionContext) unmarshalNDeleteTeam2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTeam(ctx context.Context, v interface{}) (DeleteTeam, error) { - return ec.unmarshalInputDeleteTeam(ctx, v) + res, err := ec.unmarshalInputDeleteTeam(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNDeleteTeamMember2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTeamMember(ctx context.Context, v interface{}) (DeleteTeamMember, error) { - return ec.unmarshalInputDeleteTeamMember(ctx, v) + res, err := ec.unmarshalInputDeleteTeamMember(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteTeamMemberPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTeamMemberPayload(ctx context.Context, sel ast.SelectionSet, v DeleteTeamMemberPayload) graphql.Marshaler { @@ -23108,7 +23897,8 @@ func (ec *executionContext) marshalNDeleteTeamPayload2ᚖgithubᚗcomᚋjordankn } func (ec *executionContext) unmarshalNDeleteUserAccount2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteUserAccount(ctx context.Context, v interface{}) (DeleteUserAccount, error) { - return ec.unmarshalInputDeleteUserAccount(ctx, v) + res, err := ec.unmarshalInputDeleteUserAccount(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDeleteUserAccountPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteUserAccountPayload(ctx context.Context, sel ast.SelectionSet, v DeleteUserAccountPayload) graphql.Marshaler { @@ -23126,7 +23916,8 @@ func (ec *executionContext) marshalNDeleteUserAccountPayload2ᚖgithubᚗcomᚋj } func (ec *executionContext) unmarshalNDuplicateTaskGroup2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDuplicateTaskGroup(ctx context.Context, v interface{}) (DuplicateTaskGroup, error) { - return ec.unmarshalInputDuplicateTaskGroup(ctx, v) + res, err := ec.unmarshalInputDuplicateTaskGroup(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNDuplicateTaskGroupPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDuplicateTaskGroupPayload(ctx context.Context, sel ast.SelectionSet, v DuplicateTaskGroupPayload) graphql.Marshaler { @@ -23145,7 +23936,8 @@ func (ec *executionContext) marshalNDuplicateTaskGroupPayload2ᚖgithubᚗcomᚋ func (ec *executionContext) unmarshalNEntityType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐEntityType(ctx context.Context, v interface{}) (EntityType, error) { var res EntityType - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNEntityType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐEntityType(ctx context.Context, sel ast.SelectionSet, v EntityType) graphql.Marshaler { @@ -23153,23 +23945,28 @@ func (ec *executionContext) marshalNEntityType2githubᚗcomᚋjordanknottᚋtask } func (ec *executionContext) unmarshalNFindProject2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindProject(ctx context.Context, v interface{}) (FindProject, error) { - return ec.unmarshalInputFindProject(ctx, v) + res, err := ec.unmarshalInputFindProject(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNFindTask2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindTask(ctx context.Context, v interface{}) (FindTask, error) { - return ec.unmarshalInputFindTask(ctx, v) + res, err := ec.unmarshalInputFindTask(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNFindTeam2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindTeam(ctx context.Context, v interface{}) (FindTeam, error) { - return ec.unmarshalInputFindTeam(ctx, v) + res, err := ec.unmarshalInputFindTeam(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNFindUser2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐFindUser(ctx context.Context, v interface{}) (FindUser, error) { - return ec.unmarshalInputFindUser(ctx, v) + res, err := ec.unmarshalInputFindUser(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { - return graphql.UnmarshalFloat(v) + res, err := graphql.UnmarshalFloat(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { @@ -23183,7 +23980,8 @@ func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.S } func (ec *executionContext) unmarshalNID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx context.Context, v interface{}) (uuid.UUID, error) { - return UnmarshalUUID(v) + res, err := UnmarshalUUID(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx context.Context, sel ast.SelectionSet, v uuid.UUID) graphql.Marshaler { @@ -23197,7 +23995,8 @@ func (ec *executionContext) marshalNID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx c } func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { - return graphql.UnmarshalInt(v) + res, err := graphql.UnmarshalInt(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { @@ -23211,7 +24010,8 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti } func (ec *executionContext) unmarshalNInviteProjectMembers2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐInviteProjectMembers(ctx context.Context, v interface{}) (InviteProjectMembers, error) { - return ec.unmarshalInputInviteProjectMembers(ctx, v) + res, err := ec.unmarshalInputInviteProjectMembers(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNInviteProjectMembersPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐInviteProjectMembersPayload(ctx context.Context, sel ast.SelectionSet, v InviteProjectMembersPayload) graphql.Marshaler { @@ -23382,7 +24182,8 @@ func (ec *executionContext) marshalNLabelColor2ᚖgithubᚗcomᚋjordanknottᚋt } func (ec *executionContext) unmarshalNLogoutUser2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐLogoutUser(ctx context.Context, v interface{}) (LogoutUser, error) { - return ec.unmarshalInputLogoutUser(ctx, v) + res, err := ec.unmarshalInputLogoutUser(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNMePayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMePayload(ctx context.Context, sel ast.SelectionSet, v MePayload) graphql.Marshaler { @@ -23451,7 +24252,8 @@ func (ec *executionContext) marshalNMember2ᚖgithubᚗcomᚋjordanknottᚋtaskc } func (ec *executionContext) unmarshalNMemberInvite2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberInvite(ctx context.Context, v interface{}) (MemberInvite, error) { - return ec.unmarshalInputMemberInvite(ctx, v) + res, err := ec.unmarshalInputMemberInvite(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNMemberInvite2ᚕgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberInviteᚄ(ctx context.Context, v interface{}) ([]MemberInvite, error) { @@ -23466,6 +24268,7 @@ func (ec *executionContext) unmarshalNMemberInvite2ᚕgithubᚗcomᚋjordanknott var err error res := make([]MemberInvite, len(vSlice)) for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalNMemberInvite2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberInvite(ctx, vSlice[i]) if err != nil { return nil, err @@ -23489,7 +24292,8 @@ func (ec *executionContext) marshalNMemberList2ᚖgithubᚗcomᚋjordanknottᚋt } func (ec *executionContext) unmarshalNMemberSearchFilter2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberSearchFilter(ctx context.Context, v interface{}) (MemberSearchFilter, error) { - return ec.unmarshalInputMemberSearchFilter(ctx, v) + res, err := ec.unmarshalInputMemberSearchFilter(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNMemberSearchResult2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMemberSearchResult(ctx context.Context, sel ast.SelectionSet, v MemberSearchResult) graphql.Marshaler { @@ -23534,7 +24338,8 @@ func (ec *executionContext) marshalNMemberSearchResult2ᚕgithubᚗcomᚋjordank } func (ec *executionContext) unmarshalNMyTasks2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasks(ctx context.Context, v interface{}) (MyTasks, error) { - return ec.unmarshalInputMyTasks(ctx, v) + res, err := ec.unmarshalInputMyTasks(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNMyTasksPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasksPayload(ctx context.Context, sel ast.SelectionSet, v MyTasksPayload) graphql.Marshaler { @@ -23553,7 +24358,8 @@ func (ec *executionContext) marshalNMyTasksPayload2ᚖgithubᚗcomᚋjordanknott func (ec *executionContext) unmarshalNMyTasksSort2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasksSort(ctx context.Context, v interface{}) (MyTasksSort, error) { var res MyTasksSort - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNMyTasksSort2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasksSort(ctx context.Context, sel ast.SelectionSet, v MyTasksSort) graphql.Marshaler { @@ -23562,7 +24368,8 @@ func (ec *executionContext) marshalNMyTasksSort2githubᚗcomᚋjordanknottᚋtas func (ec *executionContext) unmarshalNMyTasksStatus2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasksStatus(ctx context.Context, v interface{}) (MyTasksStatus, error) { var res MyTasksStatus - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNMyTasksStatus2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐMyTasksStatus(ctx context.Context, sel ast.SelectionSet, v MyTasksStatus) graphql.Marshaler { @@ -23570,39 +24377,43 @@ func (ec *executionContext) marshalNMyTasksStatus2githubᚗcomᚋjordanknottᚋt } func (ec *executionContext) unmarshalNNewProject2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewProject(ctx context.Context, v interface{}) (NewProject, error) { - return ec.unmarshalInputNewProject(ctx, v) + res, err := ec.unmarshalInputNewProject(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNNewProjectLabel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewProjectLabel(ctx context.Context, v interface{}) (NewProjectLabel, error) { - return ec.unmarshalInputNewProjectLabel(ctx, v) -} - -func (ec *executionContext) unmarshalNNewRefreshToken2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewRefreshToken(ctx context.Context, v interface{}) (NewRefreshToken, error) { - return ec.unmarshalInputNewRefreshToken(ctx, v) + res, err := ec.unmarshalInputNewProjectLabel(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNNewTask2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTask(ctx context.Context, v interface{}) (NewTask, error) { - return ec.unmarshalInputNewTask(ctx, v) + res, err := ec.unmarshalInputNewTask(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNNewTaskGroup2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTaskGroup(ctx context.Context, v interface{}) (NewTaskGroup, error) { - return ec.unmarshalInputNewTaskGroup(ctx, v) + res, err := ec.unmarshalInputNewTaskGroup(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNNewTaskGroupLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTaskGroupLocation(ctx context.Context, v interface{}) (NewTaskGroupLocation, error) { - return ec.unmarshalInputNewTaskGroupLocation(ctx, v) + res, err := ec.unmarshalInputNewTaskGroupLocation(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNNewTaskLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTaskLocation(ctx context.Context, v interface{}) (NewTaskLocation, error) { - return ec.unmarshalInputNewTaskLocation(ctx, v) + res, err := ec.unmarshalInputNewTaskLocation(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNNewTeam2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewTeam(ctx context.Context, v interface{}) (NewTeam, error) { - return ec.unmarshalInputNewTeam(ctx, v) + res, err := ec.unmarshalInputNewTeam(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNNewUserAccount2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐNewUserAccount(ctx context.Context, v interface{}) (NewUserAccount, error) { - return ec.unmarshalInputNewUserAccount(ctx, v) + res, err := ec.unmarshalInputNewUserAccount(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNNotification2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐNotification(ctx context.Context, sel ast.SelectionSet, v db.Notification) graphql.Marshaler { @@ -23676,7 +24487,8 @@ func (ec *executionContext) marshalNNotificationEntity2ᚖgithubᚗcomᚋjordank func (ec *executionContext) unmarshalNObjectType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐObjectType(ctx context.Context, v interface{}) (ObjectType, error) { var res ObjectType - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNObjectType2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐObjectType(ctx context.Context, sel ast.SelectionSet, v ObjectType) graphql.Marshaler { @@ -23854,6 +24666,20 @@ func (ec *executionContext) marshalNProjectLabel2ᚖgithubᚗcomᚋjordanknott return ec._ProjectLabel(ctx, sel, v) } +func (ec *executionContext) marshalNProjectPermission2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectPermission(ctx context.Context, sel ast.SelectionSet, v ProjectPermission) graphql.Marshaler { + return ec._ProjectPermission(ctx, sel, &v) +} + +func (ec *executionContext) marshalNProjectPermission2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectPermission(ctx context.Context, sel ast.SelectionSet, v *ProjectPermission) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._ProjectPermission(ctx, sel, v) +} + func (ec *executionContext) marshalNProjectRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectRole(ctx context.Context, sel ast.SelectionSet, v ProjectRole) graphql.Marshaler { return ec._ProjectRole(ctx, sel, &v) } @@ -23936,20 +24762,6 @@ func (ec *executionContext) marshalNProjectTaskMapping2ᚕgithubᚗcomᚋjordank return ret } -func (ec *executionContext) marshalNRefreshToken2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐRefreshToken(ctx context.Context, sel ast.SelectionSet, v db.RefreshToken) graphql.Marshaler { - return ec._RefreshToken(ctx, sel, &v) -} - -func (ec *executionContext) marshalNRefreshToken2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐRefreshToken(ctx context.Context, sel ast.SelectionSet, v *db.RefreshToken) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - return ec._RefreshToken(ctx, sel, v) -} - func (ec *executionContext) marshalNRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐRole(ctx context.Context, sel ast.SelectionSet, v db.Role) graphql.Marshaler { return ec._Role(ctx, sel, &v) } @@ -23966,7 +24778,8 @@ func (ec *executionContext) marshalNRole2ᚖgithubᚗcomᚋjordanknottᚋtaskcaf func (ec *executionContext) unmarshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx context.Context, v interface{}) (RoleCode, error) { var res RoleCode - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx context.Context, sel ast.SelectionSet, v RoleCode) graphql.Marshaler { @@ -23975,7 +24788,8 @@ func (ec *executionContext) marshalNRoleCode2githubᚗcomᚋjordanknottᚋtaskca func (ec *executionContext) unmarshalNRoleLevel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleLevel(ctx context.Context, v interface{}) (RoleLevel, error) { var res RoleLevel - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNRoleLevel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleLevel(ctx context.Context, sel ast.SelectionSet, v RoleLevel) graphql.Marshaler { @@ -23994,6 +24808,7 @@ func (ec *executionContext) unmarshalNRoleLevel2ᚕgithubᚗcomᚋjordanknottᚋ var err error res := make([]RoleLevel, len(vSlice)) for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalNRoleLevel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleLevel(ctx, vSlice[i]) if err != nil { return nil, err @@ -24040,16 +24855,19 @@ func (ec *executionContext) marshalNRoleLevel2ᚕgithubᚗcomᚋjordanknottᚋta } func (ec *executionContext) unmarshalNSetTaskChecklistItemComplete2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐSetTaskChecklistItemComplete(ctx context.Context, v interface{}) (SetTaskChecklistItemComplete, error) { - return ec.unmarshalInputSetTaskChecklistItemComplete(ctx, v) + res, err := ec.unmarshalInputSetTaskChecklistItemComplete(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNSetTaskComplete2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐSetTaskComplete(ctx context.Context, v interface{}) (SetTaskComplete, error) { - return ec.unmarshalInputSetTaskComplete(ctx, v) + res, err := ec.unmarshalInputSetTaskComplete(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNShareStatus2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐShareStatus(ctx context.Context, v interface{}) (ShareStatus, error) { var res ShareStatus - return res, res.UnmarshalGQL(v) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNShareStatus2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐShareStatus(ctx context.Context, sel ast.SelectionSet, v ShareStatus) graphql.Marshaler { @@ -24057,7 +24875,8 @@ func (ec *executionContext) marshalNShareStatus2githubᚗcomᚋjordanknottᚋtas } func (ec *executionContext) unmarshalNSortTaskGroup2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐSortTaskGroup(ctx context.Context, v interface{}) (SortTaskGroup, error) { - return ec.unmarshalInputSortTaskGroup(ctx, v) + res, err := ec.unmarshalInputSortTaskGroup(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNSortTaskGroupPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐSortTaskGroupPayload(ctx context.Context, sel ast.SelectionSet, v SortTaskGroupPayload) graphql.Marshaler { @@ -24075,7 +24894,8 @@ func (ec *executionContext) marshalNSortTaskGroupPayload2ᚖgithubᚗcomᚋjorda } func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { - return graphql.UnmarshalString(v) + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { @@ -24481,7 +25301,8 @@ func (ec *executionContext) marshalNTaskLabel2ᚕgithubᚗcomᚋjordanknottᚋta } func (ec *executionContext) unmarshalNTaskPositionUpdate2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTaskPositionUpdate(ctx context.Context, v interface{}) (TaskPositionUpdate, error) { - return ec.unmarshalInputTaskPositionUpdate(ctx, v) + res, err := ec.unmarshalInputTaskPositionUpdate(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNTaskPositionUpdate2ᚕgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTaskPositionUpdateᚄ(ctx context.Context, v interface{}) ([]TaskPositionUpdate, error) { @@ -24496,6 +25317,7 @@ func (ec *executionContext) unmarshalNTaskPositionUpdate2ᚕgithubᚗcomᚋjorda var err error res := make([]TaskPositionUpdate, len(vSlice)) for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalNTaskPositionUpdate2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTaskPositionUpdate(ctx, vSlice[i]) if err != nil { return nil, err @@ -24555,6 +25377,20 @@ func (ec *executionContext) marshalNTeam2ᚖgithubᚗcomᚋjordanknottᚋtaskcaf return ec._Team(ctx, sel, v) } +func (ec *executionContext) marshalNTeamPermission2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTeamPermission(ctx context.Context, sel ast.SelectionSet, v TeamPermission) graphql.Marshaler { + return ec._TeamPermission(ctx, sel, &v) +} + +func (ec *executionContext) marshalNTeamPermission2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTeamPermission(ctx context.Context, sel ast.SelectionSet, v *TeamPermission) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._TeamPermission(ctx, sel, v) +} + func (ec *executionContext) marshalNTeamRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐTeamRole(ctx context.Context, sel ast.SelectionSet, v TeamRole) graphql.Marshaler { return ec._TeamRole(ctx, sel, &v) } @@ -24597,7 +25433,8 @@ func (ec *executionContext) marshalNTeamRole2ᚕgithubᚗcomᚋjordanknottᚋtas } func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) { - return graphql.UnmarshalTime(v) + res, err := graphql.UnmarshalTime(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { @@ -24611,11 +25448,8 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as } func (ec *executionContext) unmarshalNTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalNTime2timeᚐTime(ctx, v) - return &res, err + res, err := graphql.UnmarshalTime(v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { @@ -24625,11 +25459,18 @@ func (ec *executionContext) marshalNTime2ᚖtimeᚐTime(ctx context.Context, sel } return graphql.Null } - return ec.marshalNTime2timeᚐTime(ctx, sel, *v) + res := graphql.MarshalTime(*v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNToggleTaskLabelInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐToggleTaskLabelInput(ctx context.Context, v interface{}) (ToggleTaskLabelInput, error) { - return ec.unmarshalInputToggleTaskLabelInput(ctx, v) + res, err := ec.unmarshalInputToggleTaskLabelInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNToggleTaskLabelPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐToggleTaskLabelPayload(ctx context.Context, sel ast.SelectionSet, v ToggleTaskLabelPayload) graphql.Marshaler { @@ -24647,7 +25488,8 @@ func (ec *executionContext) marshalNToggleTaskLabelPayload2ᚖgithubᚗcomᚋjor } func (ec *executionContext) unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx context.Context, v interface{}) (uuid.UUID, error) { - return UnmarshalUUID(v) + res, err := UnmarshalUUID(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx context.Context, sel ast.SelectionSet, v uuid.UUID) graphql.Marshaler { @@ -24672,6 +25514,7 @@ func (ec *executionContext) unmarshalNUUID2ᚕgithubᚗcomᚋgoogleᚋuuidᚐUUI var err error res := make([]uuid.UUID, len(vSlice)) for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, vSlice[i]) if err != nil { return nil, err @@ -24690,19 +25533,23 @@ func (ec *executionContext) marshalNUUID2ᚕgithubᚗcomᚋgoogleᚋuuidᚐUUID } func (ec *executionContext) unmarshalNUpdateProjectLabel2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectLabel(ctx context.Context, v interface{}) (UpdateProjectLabel, error) { - return ec.unmarshalInputUpdateProjectLabel(ctx, v) + res, err := ec.unmarshalInputUpdateProjectLabel(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNUpdateProjectLabelColor2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectLabelColor(ctx context.Context, v interface{}) (UpdateProjectLabelColor, error) { - return ec.unmarshalInputUpdateProjectLabelColor(ctx, v) + res, err := ec.unmarshalInputUpdateProjectLabelColor(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNUpdateProjectLabelName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectLabelName(ctx context.Context, v interface{}) (UpdateProjectLabelName, error) { - return ec.unmarshalInputUpdateProjectLabelName(ctx, v) + res, err := ec.unmarshalInputUpdateProjectLabelName(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNUpdateProjectMemberRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectMemberRole(ctx context.Context, v interface{}) (UpdateProjectMemberRole, error) { - return ec.unmarshalInputUpdateProjectMemberRole(ctx, v) + res, err := ec.unmarshalInputUpdateProjectMemberRole(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateProjectMemberRolePayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectMemberRolePayload(ctx context.Context, sel ast.SelectionSet, v UpdateProjectMemberRolePayload) graphql.Marshaler { @@ -24720,7 +25567,8 @@ func (ec *executionContext) marshalNUpdateProjectMemberRolePayload2ᚖgithubᚗc } func (ec *executionContext) unmarshalNUpdateTaskChecklistItemLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistItemLocation(ctx context.Context, v interface{}) (UpdateTaskChecklistItemLocation, error) { - return ec.unmarshalInputUpdateTaskChecklistItemLocation(ctx, v) + res, err := ec.unmarshalInputUpdateTaskChecklistItemLocation(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateTaskChecklistItemLocationPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistItemLocationPayload(ctx context.Context, sel ast.SelectionSet, v UpdateTaskChecklistItemLocationPayload) graphql.Marshaler { @@ -24738,11 +25586,13 @@ func (ec *executionContext) marshalNUpdateTaskChecklistItemLocationPayload2ᚖgi } func (ec *executionContext) unmarshalNUpdateTaskChecklistItemName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistItemName(ctx context.Context, v interface{}) (UpdateTaskChecklistItemName, error) { - return ec.unmarshalInputUpdateTaskChecklistItemName(ctx, v) + res, err := ec.unmarshalInputUpdateTaskChecklistItemName(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNUpdateTaskChecklistLocation2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistLocation(ctx context.Context, v interface{}) (UpdateTaskChecklistLocation, error) { - return ec.unmarshalInputUpdateTaskChecklistLocation(ctx, v) + res, err := ec.unmarshalInputUpdateTaskChecklistLocation(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateTaskChecklistLocationPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistLocationPayload(ctx context.Context, sel ast.SelectionSet, v UpdateTaskChecklistLocationPayload) graphql.Marshaler { @@ -24760,7 +25610,8 @@ func (ec *executionContext) marshalNUpdateTaskChecklistLocationPayload2ᚖgithub } func (ec *executionContext) unmarshalNUpdateTaskChecklistName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskChecklistName(ctx context.Context, v interface{}) (UpdateTaskChecklistName, error) { - return ec.unmarshalInputUpdateTaskChecklistName(ctx, v) + res, err := ec.unmarshalInputUpdateTaskChecklistName(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateTaskCommentPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskCommentPayload(ctx context.Context, sel ast.SelectionSet, v UpdateTaskCommentPayload) graphql.Marshaler { @@ -24778,15 +25629,18 @@ func (ec *executionContext) marshalNUpdateTaskCommentPayload2ᚖgithubᚗcomᚋj } func (ec *executionContext) unmarshalNUpdateTaskDescriptionInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskDescriptionInput(ctx context.Context, v interface{}) (UpdateTaskDescriptionInput, error) { - return ec.unmarshalInputUpdateTaskDescriptionInput(ctx, v) + res, err := ec.unmarshalInputUpdateTaskDescriptionInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNUpdateTaskDueDate2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskDueDate(ctx context.Context, v interface{}) (UpdateTaskDueDate, error) { - return ec.unmarshalInputUpdateTaskDueDate(ctx, v) + res, err := ec.unmarshalInputUpdateTaskDueDate(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNUpdateTaskGroupName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskGroupName(ctx context.Context, v interface{}) (UpdateTaskGroupName, error) { - return ec.unmarshalInputUpdateTaskGroupName(ctx, v) + res, err := ec.unmarshalInputUpdateTaskGroupName(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateTaskLocationPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskLocationPayload(ctx context.Context, sel ast.SelectionSet, v UpdateTaskLocationPayload) graphql.Marshaler { @@ -24804,11 +25658,13 @@ func (ec *executionContext) marshalNUpdateTaskLocationPayload2ᚖgithubᚗcomᚋ } func (ec *executionContext) unmarshalNUpdateTaskName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskName(ctx context.Context, v interface{}) (UpdateTaskName, error) { - return ec.unmarshalInputUpdateTaskName(ctx, v) + res, err := ec.unmarshalInputUpdateTaskName(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalNUpdateTeamMemberRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTeamMemberRole(ctx context.Context, v interface{}) (UpdateTeamMemberRole, error) { - return ec.unmarshalInputUpdateTeamMemberRole(ctx, v) + res, err := ec.unmarshalInputUpdateTeamMemberRole(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateTeamMemberRolePayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTeamMemberRolePayload(ctx context.Context, sel ast.SelectionSet, v UpdateTeamMemberRolePayload) graphql.Marshaler { @@ -24826,7 +25682,8 @@ func (ec *executionContext) marshalNUpdateTeamMemberRolePayload2ᚖgithubᚗcom } func (ec *executionContext) unmarshalNUpdateUserInfo2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserInfo(ctx context.Context, v interface{}) (UpdateUserInfo, error) { - return ec.unmarshalInputUpdateUserInfo(ctx, v) + res, err := ec.unmarshalInputUpdateUserInfo(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateUserInfoPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserInfoPayload(ctx context.Context, sel ast.SelectionSet, v UpdateUserInfoPayload) graphql.Marshaler { @@ -24844,7 +25701,8 @@ func (ec *executionContext) marshalNUpdateUserInfoPayload2ᚖgithubᚗcomᚋjord } func (ec *executionContext) unmarshalNUpdateUserPassword2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserPassword(ctx context.Context, v interface{}) (UpdateUserPassword, error) { - return ec.unmarshalInputUpdateUserPassword(ctx, v) + res, err := ec.unmarshalInputUpdateUserPassword(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateUserPasswordPayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserPasswordPayload(ctx context.Context, sel ast.SelectionSet, v UpdateUserPasswordPayload) graphql.Marshaler { @@ -24862,7 +25720,8 @@ func (ec *executionContext) marshalNUpdateUserPasswordPayload2ᚖgithubᚗcomᚋ } func (ec *executionContext) unmarshalNUpdateUserRole2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserRole(ctx context.Context, v interface{}) (UpdateUserRole, error) { - return ec.unmarshalInputUpdateUserRole(ctx, v) + res, err := ec.unmarshalInputUpdateUserRole(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUpdateUserRolePayload2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateUserRolePayload(ctx context.Context, sel ast.SelectionSet, v UpdateUserRolePayload) graphql.Marshaler { @@ -24972,7 +25831,8 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { - return graphql.UnmarshalString(v) + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { @@ -24997,6 +25857,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx conte var err error res := make([]string, len(vSlice)) for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) if err != nil { return nil, err @@ -25143,7 +26004,8 @@ func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgen } func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { - return graphql.UnmarshalString(v) + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { @@ -25156,32 +26018,25 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a return res } -func (ec *executionContext) unmarshalOAddTaskLabelInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAddTaskLabelInput(ctx context.Context, v interface{}) (AddTaskLabelInput, error) { - return ec.unmarshalInputAddTaskLabelInput(ctx, v) -} - func (ec *executionContext) unmarshalOAddTaskLabelInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAddTaskLabelInput(ctx context.Context, v interface{}) (*AddTaskLabelInput, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOAddTaskLabelInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAddTaskLabelInput(ctx, v) - return &res, err -} - -func (ec *executionContext) unmarshalOAssignTaskInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAssignTaskInput(ctx context.Context, v interface{}) (AssignTaskInput, error) { - return ec.unmarshalInputAssignTaskInput(ctx, v) + res, err := ec.unmarshalInputAddTaskLabelInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalOAssignTaskInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAssignTaskInput(ctx context.Context, v interface{}) (*AssignTaskInput, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOAssignTaskInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐAssignTaskInput(ctx, v) - return &res, err + res, err := ec.unmarshalInputAssignTaskInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { - return graphql.UnmarshalBoolean(v) + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { @@ -25192,19 +26047,15 @@ func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v int if v == nil { return nil, nil } - res, err := ec.unmarshalOBoolean2bool(ctx, v) - return &res, err + res, err := graphql.UnmarshalBoolean(v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { if v == nil { return graphql.Null } - return ec.marshalOBoolean2bool(ctx, sel, *v) -} - -func (ec *executionContext) marshalOChecklistBadge2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐChecklistBadge(ctx context.Context, sel ast.SelectionSet, v ChecklistBadge) graphql.Marshaler { - return ec._ChecklistBadge(ctx, sel, &v) + return graphql.MarshalBoolean(*v) } func (ec *executionContext) marshalOChecklistBadge2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐChecklistBadge(ctx context.Context, sel ast.SelectionSet, v *ChecklistBadge) graphql.Marshaler { @@ -25214,32 +26065,20 @@ func (ec *executionContext) marshalOChecklistBadge2ᚖgithubᚗcomᚋjordanknott return ec._ChecklistBadge(ctx, sel, v) } -func (ec *executionContext) unmarshalOCreateTaskComment2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskComment(ctx context.Context, v interface{}) (CreateTaskComment, error) { - return ec.unmarshalInputCreateTaskComment(ctx, v) -} - func (ec *executionContext) unmarshalOCreateTaskComment2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskComment(ctx context.Context, v interface{}) (*CreateTaskComment, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOCreateTaskComment2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐCreateTaskComment(ctx, v) - return &res, err -} - -func (ec *executionContext) unmarshalODeleteTaskComment2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskComment(ctx context.Context, v interface{}) (DeleteTaskComment, error) { - return ec.unmarshalInputDeleteTaskComment(ctx, v) + res, err := ec.unmarshalInputCreateTaskComment(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalODeleteTaskComment2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskComment(ctx context.Context, v interface{}) (*DeleteTaskComment, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalODeleteTaskComment2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐDeleteTaskComment(ctx, v) - return &res, err -} - -func (ec *executionContext) marshalOProfileIcon2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProfileIcon(ctx context.Context, sel ast.SelectionSet, v ProfileIcon) graphql.Marshaler { - return ec._ProfileIcon(ctx, sel, &v) + res, err := ec.unmarshalInputDeleteTaskComment(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOProfileIcon2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProfileIcon(ctx context.Context, sel ast.SelectionSet, v *ProfileIcon) graphql.Marshaler { @@ -25249,32 +26088,41 @@ func (ec *executionContext) marshalOProfileIcon2ᚖgithubᚗcomᚋjordanknottᚋ return ec._ProfileIcon(ctx, sel, v) } -func (ec *executionContext) unmarshalOProjectsFilter2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectsFilter(ctx context.Context, v interface{}) (ProjectsFilter, error) { - return ec.unmarshalInputProjectsFilter(ctx, v) -} - func (ec *executionContext) unmarshalOProjectsFilter2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectsFilter(ctx context.Context, v interface{}) (*ProjectsFilter, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOProjectsFilter2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐProjectsFilter(ctx, v) - return &res, err -} - -func (ec *executionContext) unmarshalORemoveTaskLabelInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRemoveTaskLabelInput(ctx context.Context, v interface{}) (RemoveTaskLabelInput, error) { - return ec.unmarshalInputRemoveTaskLabelInput(ctx, v) + res, err := ec.unmarshalInputProjectsFilter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalORemoveTaskLabelInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRemoveTaskLabelInput(ctx context.Context, v interface{}) (*RemoveTaskLabelInput, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalORemoveTaskLabelInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRemoveTaskLabelInput(ctx, v) - return &res, err + res, err := ec.unmarshalInputRemoveTaskLabelInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalORoleCode2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx context.Context, v interface{}) (*RoleCode, error) { + if v == nil { + return nil, nil + } + var res = new(RoleCode) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalORoleCode2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐRoleCode(ctx context.Context, sel ast.SelectionSet, v *RoleCode) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return v } func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { - return graphql.UnmarshalString(v) + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { @@ -25285,19 +26133,15 @@ func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v in if v == nil { return nil, nil } - res, err := ec.unmarshalOString2string(ctx, v) - return &res, err + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { if v == nil { return graphql.Null } - return ec.marshalOString2string(ctx, sel, *v) -} - -func (ec *executionContext) marshalOTeam2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐTeam(ctx context.Context, sel ast.SelectionSet, v db.Team) graphql.Marshaler { - return ec._Team(ctx, sel, &v) + return graphql.MarshalString(*v) } func (ec *executionContext) marshalOTeam2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐTeam(ctx context.Context, sel ast.SelectionSet, v *db.Team) graphql.Marshaler { @@ -25307,38 +26151,25 @@ func (ec *executionContext) marshalOTeam2ᚖgithubᚗcomᚋjordanknottᚋtaskcaf return ec._Team(ctx, sel, v) } -func (ec *executionContext) unmarshalOTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) { - return graphql.UnmarshalTime(v) -} - -func (ec *executionContext) marshalOTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { - return graphql.MarshalTime(v) -} - func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOTime2timeᚐTime(ctx, v) - return &res, err + res, err := graphql.UnmarshalTime(v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { if v == nil { return graphql.Null } - return ec.marshalOTime2timeᚐTime(ctx, sel, *v) -} - -func (ec *executionContext) unmarshalOUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx context.Context, v interface{}) (uuid.UUID, error) { - return UnmarshalUUID(v) -} - -func (ec *executionContext) marshalOUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx context.Context, sel ast.SelectionSet, v uuid.UUID) graphql.Marshaler { - return MarshalUUID(v) + return graphql.MarshalTime(*v) } func (ec *executionContext) unmarshalOUUID2ᚕgithubᚗcomᚋgoogleᚋuuidᚐUUIDᚄ(ctx context.Context, v interface{}) ([]uuid.UUID, error) { + if v == nil { + return nil, nil + } var vSlice []interface{} if v != nil { if tmp1, ok := v.([]interface{}); ok { @@ -25350,6 +26181,7 @@ func (ec *executionContext) unmarshalOUUID2ᚕgithubᚗcomᚋgoogleᚋuuidᚐUUI var err error res := make([]uuid.UUID, len(vSlice)) for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) res[i], err = ec.unmarshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, vSlice[i]) if err != nil { return nil, err @@ -25374,55 +26206,39 @@ func (ec *executionContext) unmarshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUI if v == nil { return nil, nil } - res, err := ec.unmarshalOUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, v) - return &res, err + res, err := UnmarshalUUID(v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx context.Context, sel ast.SelectionSet, v *uuid.UUID) graphql.Marshaler { if v == nil { return graphql.Null } - return ec.marshalOUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, sel, *v) -} - -func (ec *executionContext) unmarshalOUnassignTaskInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUnassignTaskInput(ctx context.Context, v interface{}) (UnassignTaskInput, error) { - return ec.unmarshalInputUnassignTaskInput(ctx, v) + return MarshalUUID(*v) } func (ec *executionContext) unmarshalOUnassignTaskInput2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUnassignTaskInput(ctx context.Context, v interface{}) (*UnassignTaskInput, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOUnassignTaskInput2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUnassignTaskInput(ctx, v) - return &res, err -} - -func (ec *executionContext) unmarshalOUpdateProjectName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectName(ctx context.Context, v interface{}) (UpdateProjectName, error) { - return ec.unmarshalInputUpdateProjectName(ctx, v) + res, err := ec.unmarshalInputUnassignTaskInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalOUpdateProjectName2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectName(ctx context.Context, v interface{}) (*UpdateProjectName, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOUpdateProjectName2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateProjectName(ctx, v) - return &res, err -} - -func (ec *executionContext) unmarshalOUpdateTaskComment2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskComment(ctx context.Context, v interface{}) (UpdateTaskComment, error) { - return ec.unmarshalInputUpdateTaskComment(ctx, v) + res, err := ec.unmarshalInputUpdateProjectName(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) unmarshalOUpdateTaskComment2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskComment(ctx context.Context, v interface{}) (*UpdateTaskComment, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalOUpdateTaskComment2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋgraphᚐUpdateTaskComment(ctx, v) - return &res, err -} - -func (ec *executionContext) marshalOUserAccount2githubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐUserAccount(ctx context.Context, sel ast.SelectionSet, v db.UserAccount) graphql.Marshaler { - return ec._UserAccount(ctx, sel, &v) + res, err := ec.unmarshalInputUpdateTaskComment(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalOUserAccount2ᚖgithubᚗcomᚋjordanknottᚋtaskcafeᚋinternalᚋdbᚐUserAccount(ctx context.Context, sel ast.SelectionSet, v *db.UserAccount) graphql.Marshaler { @@ -25552,10 +26368,6 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg return ret } -func (ec *executionContext) marshalO__Schema2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler { - return ec.___Schema(ctx, sel, &v) -} - func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { if v == nil { return graphql.Null @@ -25563,10 +26375,6 @@ func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlge return ec.___Schema(ctx, sel, v) } -func (ec *executionContext) marshalO__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { - return ec.___Type(ctx, sel, &v) -} - func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/internal/graph/graph.go b/internal/graph/graph.go index 20a1227..af00bc2 100644 --- a/internal/graph/graph.go +++ b/internal/graph/graph.go @@ -17,7 +17,6 @@ import ( "github.com/99designs/gqlgen/graphql/handler/transport" "github.com/99designs/gqlgen/graphql/playground" "github.com/google/uuid" - "github.com/jordanknott/taskcafe/internal/auth" "github.com/jordanknott/taskcafe/internal/db" "github.com/jordanknott/taskcafe/internal/logger" "github.com/jordanknott/taskcafe/internal/utils" @@ -34,15 +33,18 @@ func NewHandler(repo db.Repository, emailConfig utils.EmailConfig) http.Handler }, } c.Directives.HasRole = func(ctx context.Context, obj interface{}, next graphql.Resolver, roles []RoleLevel, level ActionLevel, typeArg ObjectType) (interface{}, error) { - role, ok := GetUserRole(ctx) - if !ok { - return nil, errors.New("user ID is missing") - } - if role == "admin" { - return next(ctx) - } else if level == ActionLevelOrg { - return nil, errors.New("must be an org admin") - } + /* + TODO: add permission check + role, ok := GetUserRole(ctx) + if !ok { + return nil, errors.New("user ID is missing") + } + if role == "admin" { + return next(ctx) + } else if level == ActionLevelOrg { + return nil, errors.New("must be an org admin") + } + */ var subjectID uuid.UUID in := graphql.GetFieldContext(ctx).Args["input"] @@ -76,7 +78,7 @@ func NewHandler(repo db.Repository, emailConfig utils.EmailConfig) http.Handler // TODO: add config setting to disable personal projects return next(ctx) } - subjectID, ok = subjectField.Interface().(uuid.UUID) + subjectID, ok := subjectField.Interface().(uuid.UUID) if !ok { logger.New(ctx).Error("error while casting subject UUID") return nil, errors.New("error while casting subject uuid") @@ -190,23 +192,10 @@ func GetUserID(ctx context.Context) (uuid.UUID, bool) { return userID, ok } -// GetUserRole retrieves the user role out of a context -func GetUserRole(ctx context.Context) (auth.Role, bool) { - role, ok := ctx.Value(utils.OrgRoleKey).(auth.Role) - return role, ok -} - // GetUser retrieves both the user id & user role out of a context -func GetUser(ctx context.Context) (uuid.UUID, auth.Role, bool) { +func GetUser(ctx context.Context) (uuid.UUID, bool) { userID, userOK := GetUserID(ctx) - role, roleOK := GetUserRole(ctx) - return userID, role, userOK && roleOK -} - -// GetRestrictedMode retrieves the restricted mode code out of a context -func GetRestrictedMode(ctx context.Context) (auth.RestrictedMode, bool) { - restricted, ok := ctx.Value(utils.RestrictedModeKey).(auth.RestrictedMode) - return restricted, ok + return userID, userOK } // GetProjectRoles retrieves the team & project role for the given project ID diff --git a/internal/graph/models_gen.go b/internal/graph/models_gen.go index 1f48204..c2ef349 100644 --- a/internal/graph/models_gen.go +++ b/internal/graph/models_gen.go @@ -255,6 +255,7 @@ type LogoutUser struct { type MePayload struct { User *db.UserAccount `json:"user"` + Organization *RoleCode `json:"organization"` TeamRoles []TeamRole `json:"teamRoles"` ProjectRoles []ProjectRole `json:"projectRoles"` } @@ -312,10 +313,6 @@ type NewProjectLabel struct { Name *string `json:"name"` } -type NewRefreshToken struct { - UserID uuid.UUID `json:"userID"` -} - type NewTask struct { TaskGroupID uuid.UUID `json:"taskGroupID"` Name string `json:"name"` @@ -382,6 +379,12 @@ type ProfileIcon struct { BgColor *string `json:"bgColor"` } +type ProjectPermission struct { + Team RoleCode `json:"team"` + Project RoleCode `json:"project"` + Org RoleCode `json:"org"` +} + type ProjectRole struct { ProjectID uuid.UUID `json:"projectID"` RoleCode RoleCode `json:"roleCode"` @@ -435,6 +438,11 @@ type TaskPositionUpdate struct { Position float64 `json:"position"` } +type TeamPermission struct { + Team RoleCode `json:"team"` + Org RoleCode `json:"org"` +} + type TeamRole struct { TeamID uuid.UUID `json:"teamID"` RoleCode RoleCode `json:"roleCode"` diff --git a/internal/graph/schema.graphqls b/internal/graph/schema.graphqls index 30369da..4ccf57c 100644 --- a/internal/graph/schema.graphqls +++ b/internal/graph/schema.graphqls @@ -50,13 +50,6 @@ type Member { member: MemberList! } -type RefreshToken { - id: ID! - userId: UUID! - expiresAt: Time! - createdAt: Time! -} - type Role { code: String! name: String! @@ -97,6 +90,7 @@ type Team { id: ID! createdAt: Time! name: String! + permission: TeamPermission! members: [Member!]! } @@ -106,6 +100,17 @@ type InvitedMember { invitedOn: Time! } +type TeamPermission { + team: RoleCode! + org: RoleCode! +} + +type ProjectPermission { + team: RoleCode! + project: RoleCode! + org: RoleCode! +} + type Project { id: ID! createdAt: Time! @@ -114,6 +119,7 @@ type Project { taskGroups: [TaskGroup!]! members: [Member!]! invitedMembers: [InvitedMember!]! + permission: ProjectPermission! labels: [ProjectLabel!]! } @@ -314,6 +320,7 @@ type ProjectRole { type MePayload { user: UserAccount! + organization: RoleCode teamRoles: [TeamRole!]! projectRoles: [ProjectRole!]! } @@ -881,7 +888,6 @@ type UpdateTeamMemberRolePayload { } extend type Mutation { - createRefreshToken(input: NewRefreshToken!): RefreshToken! createUserAccount(input: NewUserAccount!): UserAccount! @hasRole(roles: [ADMIN], level: ORG, type: ORG) deleteUserAccount(input: DeleteUserAccount!): @@ -954,10 +960,6 @@ type UpdateUserRolePayload { user: UserAccount! } -input NewRefreshToken { - userID: UUID! -} - input NewUserAccount { username: String! email: String! diff --git a/internal/graph/schema.resolvers.go b/internal/graph/schema.resolvers.go index 731ea25..d3a8c8d 100644 --- a/internal/graph/schema.resolvers.go +++ b/internal/graph/schema.resolvers.go @@ -13,7 +13,6 @@ import ( "github.com/google/uuid" "github.com/jinzhu/now" - "github.com/jordanknott/taskcafe/internal/auth" "github.com/jordanknott/taskcafe/internal/db" "github.com/jordanknott/taskcafe/internal/logger" "github.com/jordanknott/taskcafe/internal/utils" @@ -864,11 +863,12 @@ func (r *mutationResolver) DeleteTeam(ctx context.Context, input DeleteTeam) (*D } func (r *mutationResolver) CreateTeam(ctx context.Context, input NewTeam) (*db.Team, error) { - _, role, ok := GetUser(ctx) + _, ok := GetUser(ctx) if !ok { return &db.Team{}, nil } - if role == auth.RoleAdmin { + // if role == auth.RoleAdmin { // TODO: add permision check + if true { createdAt := time.Now().UTC() team, err := r.Repository.CreateTeam(ctx, db.CreateTeamParams{OrganizationID: input.OrganizationID, CreatedAt: createdAt, Name: input.Name}) return &team, err @@ -944,20 +944,13 @@ func (r *mutationResolver) DeleteTeamMember(ctx context.Context, input DeleteTea return &DeleteTeamMemberPayload{TeamID: input.TeamID, UserID: input.UserID}, err } -func (r *mutationResolver) CreateRefreshToken(ctx context.Context, input NewRefreshToken) (*db.RefreshToken, error) { - userID := uuid.MustParse("0183d9ab-d0ed-4c9b-a3df-77a0cdd93dca") - refreshCreatedAt := time.Now().UTC() - refreshExpiresAt := refreshCreatedAt.AddDate(0, 0, 1) - refreshToken, err := r.Repository.CreateRefreshToken(ctx, db.CreateRefreshTokenParams{userID, refreshCreatedAt, refreshExpiresAt}) - return &refreshToken, err -} - func (r *mutationResolver) CreateUserAccount(ctx context.Context, input NewUserAccount) (*db.UserAccount, error) { - _, role, ok := GetUser(ctx) + _, ok := GetUser(ctx) if !ok { return &db.UserAccount{}, nil } - if role != auth.RoleAdmin { + // if role != auth.RoleAdmin { TODO: add permsion check + if true { return &db.UserAccount{}, &gqlerror.Error{ Message: "Must be an organization admin", Extensions: map[string]interface{}{ @@ -984,11 +977,12 @@ func (r *mutationResolver) CreateUserAccount(ctx context.Context, input NewUserA } func (r *mutationResolver) DeleteUserAccount(ctx context.Context, input DeleteUserAccount) (*DeleteUserAccountPayload, error) { - _, role, ok := GetUser(ctx) + _, ok := GetUser(ctx) if !ok { return &DeleteUserAccountPayload{Ok: false}, nil } - if role != auth.RoleAdmin { + // if role != auth.RoleAdmin { TODO: add permision check + if true { return &DeleteUserAccountPayload{Ok: false}, &gqlerror.Error{ Message: "User not found", Extensions: map[string]interface{}{ @@ -1030,7 +1024,7 @@ func (r *mutationResolver) DeleteInvitedUserAccount(ctx context.Context, input D } func (r *mutationResolver) LogoutUser(ctx context.Context, input LogoutUser) (bool, error) { - err := r.Repository.DeleteRefreshTokenByUserID(ctx, input.UserID) + err := r.Repository.DeleteAuthTokenByUserID(ctx, input.UserID) return true, err } @@ -1059,11 +1053,12 @@ func (r *mutationResolver) UpdateUserPassword(ctx context.Context, input UpdateU } func (r *mutationResolver) UpdateUserRole(ctx context.Context, input UpdateUserRole) (*UpdateUserRolePayload, error) { - _, role, ok := GetUser(ctx) + _, ok := GetUser(ctx) if !ok { return &UpdateUserRolePayload{}, nil } - if role != auth.RoleAdmin { + // if role != auth.RoleAdmin { TODO: add permision check + if true { return &UpdateUserRolePayload{}, &gqlerror.Error{ Message: "User not found", Extensions: map[string]interface{}{ @@ -1211,6 +1206,10 @@ func (r *projectResolver) InvitedMembers(ctx context.Context, obj *db.Project) ( return invited, err } +func (r *projectResolver) Permission(ctx context.Context, obj *db.Project) (*ProjectPermission, error) { + panic(fmt.Errorf("not implemented")) +} + func (r *projectResolver) Labels(ctx context.Context, obj *db.Project) ([]db.ProjectLabel, error) { labels, err := r.Repository.GetProjectLabelsForProject(ctx, obj.ProjectID) return labels, err @@ -1296,7 +1295,7 @@ func (r *queryResolver) FindTask(ctx context.Context, input FindTask) (*db.Task, } func (r *queryResolver) Projects(ctx context.Context, input *ProjectsFilter) ([]db.Project, error) { - userID, orgRole, ok := GetUser(ctx) + userID, ok := GetUser(ctx) if !ok { logger.New(ctx).Info("user id was not found from middleware") return []db.Project{}, nil @@ -1309,11 +1308,14 @@ func (r *queryResolver) Projects(ctx context.Context, input *ProjectsFilter) ([] var teams []db.Team var err error + /* TODO: add permsion check if orgRole == "admin" { teams, err = r.Repository.GetAllTeams(ctx) } else { teams, err = r.Repository.GetTeamsForUserIDWhereAdmin(ctx, userID) } + */ + teams, err = r.Repository.GetAllTeams(ctx) projects := make(map[string]db.Project) for _, team := range teams { @@ -1359,15 +1361,18 @@ func (r *queryResolver) FindTeam(ctx context.Context, input FindTeam) (*db.Team, } func (r *queryResolver) Teams(ctx context.Context) ([]db.Team, error) { - userID, orgRole, ok := GetUser(ctx) + userID, ok := GetUser(ctx) if !ok { logger.New(ctx).Error("userID or org role does not exist") return []db.Team{}, errors.New("internal error") } - if orgRole == "admin" { - return r.Repository.GetAllTeams(ctx) - } + /* + TODO: add permision check + if orgRole == "admin" { + return r.Repository.GetAllTeams(ctx) + } + */ teams := make(map[string]db.Team) adminTeams, err := r.Repository.GetTeamsForUserIDWhereAdmin(ctx, userID) @@ -1596,10 +1601,6 @@ func (r *queryResolver) SearchMembers(ctx context.Context, input MemberSearchFil return results, nil } -func (r *refreshTokenResolver) ID(ctx context.Context, obj *db.RefreshToken) (uuid.UUID, error) { - return obj.TokenID, nil -} - func (r *taskResolver) ID(ctx context.Context, obj *db.Task) (uuid.UUID, error) { return obj.TaskID, nil } @@ -1848,6 +1849,10 @@ func (r *teamResolver) ID(ctx context.Context, obj *db.Team) (uuid.UUID, error) return obj.TeamID, nil } +func (r *teamResolver) Permission(ctx context.Context, obj *db.Team) (*TeamPermission, error) { + panic(fmt.Errorf("not implemented")) +} + func (r *teamResolver) Members(ctx context.Context, obj *db.Team) ([]Member, error) { members := []Member{} @@ -1966,9 +1971,6 @@ func (r *Resolver) ProjectLabel() ProjectLabelResolver { return &projectLabelRes // Query returns QueryResolver implementation. func (r *Resolver) Query() QueryResolver { return &queryResolver{r} } -// RefreshToken returns RefreshTokenResolver implementation. -func (r *Resolver) RefreshToken() RefreshTokenResolver { return &refreshTokenResolver{r} } - // Task returns TaskResolver implementation. func (r *Resolver) Task() TaskResolver { return &taskResolver{r} } @@ -2005,7 +2007,6 @@ type organizationResolver struct{ *Resolver } type projectResolver struct{ *Resolver } type projectLabelResolver struct{ *Resolver } type queryResolver struct{ *Resolver } -type refreshTokenResolver struct{ *Resolver } type taskResolver struct{ *Resolver } type taskActivityResolver struct{ *Resolver } type taskChecklistResolver struct{ *Resolver } diff --git a/internal/graph/schema/_models.gql b/internal/graph/schema/_models.gql index c2ad18a..7f9b009 100644 --- a/internal/graph/schema/_models.gql +++ b/internal/graph/schema/_models.gql @@ -50,13 +50,6 @@ type Member { member: MemberList! } -type RefreshToken { - id: ID! - userId: UUID! - expiresAt: Time! - createdAt: Time! -} - type Role { code: String! name: String! @@ -97,6 +90,7 @@ type Team { id: ID! createdAt: Time! name: String! + permission: TeamPermission! members: [Member!]! } @@ -106,6 +100,17 @@ type InvitedMember { invitedOn: Time! } +type TeamPermission { + team: RoleCode! + org: RoleCode! +} + +type ProjectPermission { + team: RoleCode! + project: RoleCode! + org: RoleCode! +} + type Project { id: ID! createdAt: Time! @@ -114,6 +119,7 @@ type Project { taskGroups: [TaskGroup!]! members: [Member!]! invitedMembers: [InvitedMember!]! + permission: ProjectPermission! labels: [ProjectLabel!]! } diff --git a/internal/graph/schema/_root.gql b/internal/graph/schema/_root.gql index 091e442..ab197ee 100644 --- a/internal/graph/schema/_root.gql +++ b/internal/graph/schema/_root.gql @@ -90,6 +90,7 @@ type ProjectRole { type MePayload { user: UserAccount! + organization: RoleCode teamRoles: [TeamRole!]! projectRoles: [ProjectRole!]! } diff --git a/internal/graph/schema/user.gql b/internal/graph/schema/user.gql index b9c86ab..b064d61 100644 --- a/internal/graph/schema/user.gql +++ b/internal/graph/schema/user.gql @@ -1,5 +1,4 @@ extend type Mutation { - createRefreshToken(input: NewRefreshToken!): RefreshToken! createUserAccount(input: NewUserAccount!): UserAccount! @hasRole(roles: [ADMIN], level: ORG, type: ORG) deleteUserAccount(input: DeleteUserAccount!): @@ -72,10 +71,6 @@ type UpdateUserRolePayload { user: UserAccount! } -input NewRefreshToken { - userID: UUID! -} - input NewUserAccount { username: String! email: String! diff --git a/internal/route/auth.go b/internal/route/auth.go index e981b5a..aa6bccc 100644 --- a/internal/route/auth.go +++ b/internal/route/auth.go @@ -8,7 +8,6 @@ import ( "github.com/go-chi/chi" "github.com/google/uuid" - "github.com/jordanknott/taskcafe/internal/auth" "github.com/jordanknott/taskcafe/internal/db" log "github.com/sirupsen/logrus" "golang.org/x/crypto/bcrypt" @@ -54,10 +53,15 @@ type Setup struct { ConfirmToken string `json:"confirmToken"` } +type ValidateAuthTokenResponse struct { + Valid bool `json:"valid"` + UserID string `json:"userID"` +} + // LoginResponseData is the response data for when a user logs in type LoginResponseData struct { - AccessToken string `json:"accessToken"` - Setup bool `json:"setup"` + UserID string `json:"userID"` + Complete bool `json:"complete"` } // LogoutResponseData is the response data for when a user logs out @@ -65,8 +69,8 @@ type LogoutResponseData struct { Status string `json:"status"` } -// RefreshTokenResponseData is the response data for when an access token is refreshed -type RefreshTokenResponseData struct { +// AuthTokenResponseData is the response data for when an access token is refreshed +type AuthTokenResponseData struct { AccessToken string `json:"accessToken"` } @@ -76,93 +80,9 @@ type AvatarUploadResponseData struct { URL string `json:"url"` } -// RefreshTokenHandler handles when a user attempts to refresh token -func (h *TaskcafeHandler) RefreshTokenHandler(w http.ResponseWriter, r *http.Request) { - userExists, err := h.repo.HasAnyUser(r.Context()) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - log.WithError(err).Error("issue while fetching if user accounts exist") - return - } - - log.WithField("userExists", userExists).Info("checking if setup") - if !userExists { - w.Header().Set("Content-type", "application/json") - json.NewEncoder(w).Encode(LoginResponseData{AccessToken: "", Setup: true}) - return - } - - c, err := r.Cookie("refreshToken") - if err != nil { - if err == http.ErrNoCookie { - log.Warn("no cookie") - w.WriteHeader(http.StatusBadRequest) - return - } - log.WithError(err).Error("unknown error") - w.WriteHeader(http.StatusBadRequest) - return - } - refreshTokenID := uuid.MustParse(c.Value) - token, err := h.repo.GetRefreshTokenByID(r.Context(), refreshTokenID) - if err != nil { - if err == sql.ErrNoRows { - - log.WithError(err).WithFields(log.Fields{"refreshTokenID": refreshTokenID.String()}).Error("no tokens found") - w.WriteHeader(http.StatusBadRequest) - return - } - log.WithError(err).Error("token retrieve failure") - w.WriteHeader(http.StatusBadRequest) - return - } - - user, err := h.repo.GetUserAccountByID(r.Context(), token.UserID) - if err != nil { - log.WithError(err).Error("user retrieve failure") - w.WriteHeader(http.StatusInternalServerError) - return - } - - if !user.Active { - log.WithFields(log.Fields{ - "username": user.Username, - }).Warn("attempt to refresh token with inactive user") - w.WriteHeader(http.StatusUnauthorized) - return - } - - refreshCreatedAt := time.Now().UTC() - refreshExpiresAt := refreshCreatedAt.AddDate(0, 0, 1) - refreshTokenString, err := h.repo.CreateRefreshToken(r.Context(), db.CreateRefreshTokenParams{token.UserID, refreshCreatedAt, refreshExpiresAt}) - - err = h.repo.DeleteRefreshTokenByID(r.Context(), token.TokenID) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - return - } - - log.Info("here 1") - accessTokenString, err := auth.NewAccessToken(token.UserID.String(), auth.Unrestricted, user.RoleCode, h.SecurityConfig.Secret, h.SecurityConfig.AccessTokenExpiration) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - return - } - - log.Info("here 2") - w.Header().Set("Content-type", "application/json") - http.SetCookie(w, &http.Cookie{ - Name: "refreshToken", - Value: refreshTokenString.TokenID.String(), - Expires: refreshExpiresAt, - HttpOnly: true, - }) - json.NewEncoder(w).Encode(LoginResponseData{AccessToken: accessTokenString, Setup: false}) -} - // LogoutHandler removes all refresh tokens to log out user func (h *TaskcafeHandler) LogoutHandler(w http.ResponseWriter, r *http.Request) { - c, err := r.Cookie("refreshToken") + c, err := r.Cookie("authToken") if err != nil { if err == http.ErrNoCookie { w.WriteHeader(http.StatusBadRequest) @@ -172,7 +92,7 @@ func (h *TaskcafeHandler) LogoutHandler(w http.ResponseWriter, r *http.Request) return } refreshTokenID := uuid.MustParse(c.Value) - err = h.repo.DeleteRefreshTokenByID(r.Context(), refreshTokenID) + err = h.repo.DeleteAuthTokenByID(r.Context(), refreshTokenID) if err != nil { w.WriteHeader(http.StatusInternalServerError) return @@ -216,87 +136,23 @@ func (h *TaskcafeHandler) LoginHandler(w http.ResponseWriter, r *http.Request) { return } - refreshCreatedAt := time.Now().UTC() - refreshExpiresAt := refreshCreatedAt.AddDate(0, 0, 1) - refreshTokenString, err := h.repo.CreateRefreshToken(r.Context(), db.CreateRefreshTokenParams{user.UserID, refreshCreatedAt, refreshExpiresAt}) + authCreatedAt := time.Now().UTC() + authExpiresAt := authCreatedAt.AddDate(0, 0, 1) + authToken, err := h.repo.CreateAuthToken(r.Context(), db.CreateAuthTokenParams{user.UserID, authCreatedAt, authExpiresAt}) - accessTokenString, err := auth.NewAccessToken(user.UserID.String(), auth.Unrestricted, user.RoleCode, h.SecurityConfig.Secret, h.SecurityConfig.AccessTokenExpiration) if err != nil { w.WriteHeader(http.StatusInternalServerError) } w.Header().Set("Content-type", "application/json") http.SetCookie(w, &http.Cookie{ - Name: "refreshToken", - Value: refreshTokenString.TokenID.String(), - Expires: refreshExpiresAt, + Name: "authToken", + Value: authToken.TokenID.String(), + Expires: authExpiresAt, + Path: "/", HttpOnly: true, }) - json.NewEncoder(w).Encode(LoginResponseData{accessTokenString, false}) -} - -// TODO: remove -// InstallHandler creates first user on fresh install -func (h *TaskcafeHandler) InstallHandler(w http.ResponseWriter, r *http.Request) { - if restricted, ok := r.Context().Value("restricted_mode").(auth.RestrictedMode); ok { - if restricted != auth.InstallOnly { - log.Warning("attempted to install without install only restriction") - w.WriteHeader(http.StatusBadRequest) - return - } - } - - _, err := h.repo.GetSystemOptionByKey(r.Context(), "is_installed") - if err != sql.ErrNoRows { - log.WithError(err).Error("install handler called even though system is installed") - w.WriteHeader(http.StatusBadRequest) - return - } - - var requestData InstallRequestData - err = json.NewDecoder(r.Body).Decode(&requestData) - if err != nil { - w.WriteHeader(http.StatusBadRequest) - return - } - - createdAt := time.Now().UTC() - hashedPwd, err := bcrypt.GenerateFromPassword([]byte(requestData.User.Password), 14) - user, err := h.repo.CreateUserAccount(r.Context(), db.CreateUserAccountParams{ - FullName: requestData.User.FullName, - Username: requestData.User.Username, - Initials: requestData.User.Initials, - Email: requestData.User.Email, - PasswordHash: string(hashedPwd), - CreatedAt: createdAt, - RoleCode: "admin", - }) - - _, err = h.repo.CreateSystemOption(r.Context(), db.CreateSystemOptionParams{Key: "is_installed", Value: sql.NullString{Valid: true, String: "true"}}) - if err != nil { - w.WriteHeader(http.StatusBadRequest) - return - } - - refreshCreatedAt := time.Now().UTC() - refreshExpiresAt := refreshCreatedAt.AddDate(0, 0, 1) - refreshTokenString, err := h.repo.CreateRefreshToken(r.Context(), db.CreateRefreshTokenParams{user.UserID, refreshCreatedAt, refreshExpiresAt}) - - log.WithField("userID", user.UserID.String()).Info("creating install access token") - accessTokenString, err := auth.NewAccessToken(user.UserID.String(), auth.Unrestricted, user.RoleCode, h.SecurityConfig.Secret, h.SecurityConfig.AccessTokenExpiration) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - } - log.Info(accessTokenString) - - w.Header().Set("Content-type", "application/json") - http.SetCookie(w, &http.Cookie{ - Name: "refreshToken", - Value: refreshTokenString.TokenID.String(), - Expires: refreshExpiresAt, - HttpOnly: true, - }) - json.NewEncoder(w).Encode(LoginResponseData{accessTokenString, false}) + json.NewEncoder(w).Encode(LoginResponseData{Complete: true, UserID: authToken.UserID.String()}) } func (h *TaskcafeHandler) ConfirmUser(w http.ResponseWriter, r *http.Request) { @@ -382,23 +238,43 @@ func (h *TaskcafeHandler) ConfirmUser(w http.ResponseWriter, r *http.Request) { } - refreshCreatedAt := time.Now().UTC() - refreshExpiresAt := refreshCreatedAt.AddDate(0, 0, 1) - refreshTokenString, err := h.repo.CreateRefreshToken(r.Context(), db.CreateRefreshTokenParams{user.UserID, refreshCreatedAt, refreshExpiresAt}) + authCreatedAt := time.Now().UTC() + authExpiresAt := authCreatedAt.AddDate(0, 0, 1) + authToken, err := h.repo.CreateAuthToken(r.Context(), db.CreateAuthTokenParams{user.UserID, authCreatedAt, authExpiresAt}) - accessTokenString, err := auth.NewAccessToken(user.UserID.String(), auth.Unrestricted, user.RoleCode, h.SecurityConfig.Secret, h.SecurityConfig.AccessTokenExpiration) if err != nil { w.WriteHeader(http.StatusInternalServerError) + return } w.Header().Set("Content-type", "application/json") http.SetCookie(w, &http.Cookie{ - Name: "refreshToken", - Value: refreshTokenString.TokenID.String(), - Expires: refreshExpiresAt, + Name: "authToken", + Value: authToken.TokenID.String(), + Path: "/", + Expires: authExpiresAt, HttpOnly: true, }) - json.NewEncoder(w).Encode(LoginResponseData{accessTokenString, false}) + json.NewEncoder(w).Encode(LoginResponseData{Complete: true, UserID: authToken.UserID.String()}) +} +func (h *TaskcafeHandler) ValidateAuthTokenHandler(w http.ResponseWriter, r *http.Request) { + c, err := r.Cookie("authToken") + if err != nil { + if err == http.ErrNoCookie { + json.NewEncoder(w).Encode(ValidateAuthTokenResponse{Valid: false, UserID: ""}) + return + } + log.WithError(err).Error("unknown error") + w.WriteHeader(http.StatusBadRequest) + return + } + authTokenID := uuid.MustParse(c.Value) + token, err := h.repo.GetAuthTokenByID(r.Context(), authTokenID) + if err != nil { + json.NewEncoder(w).Encode(ValidateAuthTokenResponse{Valid: false, UserID: ""}) + } else { + json.NewEncoder(w).Encode(ValidateAuthTokenResponse{Valid: true, UserID: token.UserID.String()}) + } } func (h *TaskcafeHandler) RegisterUser(w http.ResponseWriter, r *http.Request) { @@ -425,6 +301,7 @@ func (h *TaskcafeHandler) RegisterUser(w http.ResponseWriter, r *http.Request) { if err != nil { log.WithError(err).Error("error checking for active user") w.WriteHeader(http.StatusInternalServerError) + return } if !hasActiveUser { json.NewEncoder(w).Encode(RegisteredUserResponseData{Setup: true}) @@ -469,7 +346,7 @@ func (h *TaskcafeHandler) RegisterUser(w http.ResponseWriter, r *http.Request) { func (rs authResource) Routes(taskcafeHandler TaskcafeHandler) chi.Router { r := chi.NewRouter() r.Post("/login", taskcafeHandler.LoginHandler) - r.Post("/refresh_token", taskcafeHandler.RefreshTokenHandler) r.Post("/logout", taskcafeHandler.LogoutHandler) + r.Post("/validate", taskcafeHandler.ValidateAuthTokenHandler) return r } diff --git a/internal/route/middleware.go b/internal/route/middleware.go index 9442e6d..dcc86fa 100644 --- a/internal/route/middleware.go +++ b/internal/route/middleware.go @@ -3,35 +3,51 @@ package route import ( "context" "net/http" - "strings" "github.com/google/uuid" - "github.com/jordanknott/taskcafe/internal/auth" + "github.com/jordanknott/taskcafe/internal/db" "github.com/jordanknott/taskcafe/internal/utils" log "github.com/sirupsen/logrus" ) // AuthenticationMiddleware is a middleware that requires a valid JWT token to be passed via the Authorization header type AuthenticationMiddleware struct { - jwtKey []byte + repo db.Repository } // Middleware returns the middleware handler func (m *AuthenticationMiddleware) Middleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { requestID := uuid.New() - bearerTokenRaw := r.Header.Get("Authorization") - splitToken := strings.Split(bearerTokenRaw, "Bearer") - if len(splitToken) != 2 { - w.WriteHeader(http.StatusBadRequest) - return - } - accessTokenString := strings.TrimSpace(splitToken[1]) - accessClaims, err := auth.ValidateAccessToken(accessTokenString, m.jwtKey) + foundToken := true + tokenRaw := "" + c, err := r.Cookie("authToken") if err != nil { - if _, ok := err.(*auth.ErrExpiredToken); ok { - w.WriteHeader(http.StatusUnauthorized) - w.Write([]byte(`{ + if err == http.ErrNoCookie { + foundToken = false + } else { + log.WithError(err).Error("unknown error") + w.WriteHeader(http.StatusBadRequest) + return + } + } + if !foundToken { + token := r.Header.Get("Authorization") + if token == "" { + log.WithError(err).Error("no auth token found in cookie or authorization header") + w.WriteHeader(http.StatusBadRequest) + return + } + tokenRaw = token + } else { + tokenRaw = c.Value + } + authTokenID := uuid.MustParse(tokenRaw) + token, err := m.repo.GetAuthTokenByID(r.Context(), authTokenID) + + if err != nil { + w.WriteHeader(http.StatusUnauthorized) + w.Write([]byte(`{ "data": {}, "errors": [ { @@ -41,27 +57,12 @@ func (m *AuthenticationMiddleware) Middleware(next http.Handler) http.Handler { } ] }`)) - return - } - log.Error(err) - w.WriteHeader(http.StatusBadRequest) return } - var userID uuid.UUID - if accessClaims.Restricted == auth.InstallOnly { - userID = uuid.New() - } else { - userID, err = uuid.Parse(accessClaims.UserID) - if err != nil { - log.WithError(err).Error("middleware access token userID parse") - w.WriteHeader(http.StatusBadRequest) - return - } - } - ctx := context.WithValue(r.Context(), utils.UserIDKey, userID) - ctx = context.WithValue(ctx, utils.RestrictedModeKey, accessClaims.Restricted) - ctx = context.WithValue(ctx, utils.OrgRoleKey, accessClaims.OrgRole) + ctx := context.WithValue(r.Context(), utils.UserIDKey, token.UserID) + // ctx = context.WithValue(ctx, utils.RestrictedModeKey, accessClaims.Restricted) + // ctx = context.WithValue(ctx, utils.OrgRoleKey, accessClaims.OrgRole) ctx = context.WithValue(ctx, utils.ReqIDKey, requestID) next.ServeHTTP(w, r.WithContext(ctx)) diff --git a/internal/route/route.go b/internal/route/route.go index e552d86..eaf3473 100644 --- a/internal/route/route.go +++ b/internal/route/route.go @@ -6,6 +6,7 @@ import ( "github.com/go-chi/chi" "github.com/go-chi/chi/middleware" + "github.com/go-chi/cors" "github.com/jmoiron/sqlx" log "github.com/sirupsen/logrus" @@ -80,6 +81,17 @@ func NewRouter(dbConnection *sqlx.DB, emailConfig utils.EmailConfig, securityCon r.Use(middleware.Recoverer) r.Use(middleware.Timeout(60 * time.Second)) + r.Use(cors.Handler(cors.Options{ + // AllowedOrigins: []string{"https://foo.com"}, // Use this to allow specific origin hosts + AllowedOrigins: []string{"https://*", "http://*"}, + // AllowOriginFunc: func(r *http.Request, origin string) bool { return true }, + AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, + AllowedHeaders: []string{"Accept", "Authorization", "Cookie", "Content-Type", "X-CSRF-Token"}, + ExposedHeaders: []string{"Link"}, + AllowCredentials: true, + MaxAge: 300, // Maximum value not ignored by any of major browsers + })) + repository := db.NewRepository(dbConnection) taskcafeHandler := TaskcafeHandler{*repository, securityConfig} @@ -91,7 +103,7 @@ func NewRouter(dbConnection *sqlx.DB, emailConfig utils.EmailConfig, securityCon mux.Post("/auth/confirm", taskcafeHandler.ConfirmUser) mux.Post("/auth/register", taskcafeHandler.RegisterUser) }) - auth := AuthenticationMiddleware{securityConfig.Secret} + auth := AuthenticationMiddleware{*repository} r.Group(func(mux chi.Router) { mux.Use(auth.Middleware) mux.Post("/users/me/avatar", taskcafeHandler.ProfileImageUpload) diff --git a/migrations/0064_rename-refresh_token-to-auth_token.up.sql b/migrations/0064_rename-refresh_token-to-auth_token.up.sql new file mode 100644 index 0000000..c498387 --- /dev/null +++ b/migrations/0064_rename-refresh_token-to-auth_token.up.sql @@ -0,0 +1 @@ +ALTER TABLE refresh_token RENAME TO auth_token;