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

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

View File

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

View File

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

View File

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

View File

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

View File

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