Skip to content

Commit

Permalink
pull from staging
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseMarioDev committed Oct 23, 2019
2 parents d626717 + 636d758 commit 2868f95
Show file tree
Hide file tree
Showing 38 changed files with 573 additions and 285 deletions.
Binary file modified .DS_Store
Binary file not shown.
59 changes: 50 additions & 9 deletions revclient/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions revclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@lottiefiles/lottie-player": "^0.2.1",
"apollo-boost": "^0.4.4",
"apollo-cache-inmemory": "^1.6.3",
"apollo-client": "^2.6.4",
Expand Down
96 changes: 60 additions & 36 deletions revclient/src/graphql/fragments/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,22 @@ export const COMMENTS_FRAG = gql`
likes {
id
profile {
...UserSummary
id
verified
email
firstName
lastName
profileImage
country
state
city
zip
phone
address
aptNumber
}
}
}
${USER_SUMMARY_FRAG}
`;


Expand Down Expand Up @@ -63,23 +74,6 @@ export const PROJECT_SUMMARY_FRAG = gql`
difficulty
startDate
featuredImage
applicants {
id
licensed
coverLetter
jobExperience
education
availability
status
trade {
id
name
description
}
profile {
...UserSummary
}
}
images {
id
imageUrl
Expand All @@ -92,38 +86,68 @@ export const PROJECT_SUMMARY_FRAG = gql`
id
profile {
id
verified
email
firstName
lastName
profileImage
country
state
city
zip
phone
address
aptNumber
}
}
tradeMasters {
id
profile {
...UserSummary
}
}
students {
id
profile {
...UserSummary
id
verified
email
firstName
lastName
profileImage
country
state
city
zip
phone
address
aptNumber
}
}
trades {
id
name
description
}
tradeMasters {
id
profile {
id
profileImage
firstName
lastName
email
address
city
state
zip
}
}
tasks {
...Tasks
id
title
description
priority
dueDate
budgetHours
completed
}
# comments {
# id
# ...Comments
# profile {
# ...UserSummary
# }
# }
}
${USER_SUMMARY_FRAG}
${TASKS_FRAG}
`


Expand Down
23 changes: 7 additions & 16 deletions revclient/src/graphql/mutations/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const ADD_PROJECT = gql`
createProject(data: $data) {
id
slug
featuredImage
images {
id
imageUrl
Expand Down Expand Up @@ -72,22 +73,11 @@ export const DONATE_TO_PROJECT = gql`
`;

export const REMOVE_COMMENT = gql`
mutation($id: ID!) {
deleteProjectComment(id: $id) {
id
project {
name
# comments {
# id
# comment
# likes {
# id
# }
# }
}
comment
}
}
mutation($id: ID!) {
deleteProjectComment(id: $id) {
id
}
}
`;

export const EDIT_COMMENT = gql`
Expand Down Expand Up @@ -194,6 +184,7 @@ export const UPDATE_PROJECT_TASK = gql`
data: $data
) {
id
completed
}
}
`
36 changes: 25 additions & 11 deletions revclient/src/graphql/queries/Projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const GET_PROJECTS = gql`
...ProjectSummary
}
}
${USER_SUMMARY_FRAG}
${PROJECT_SUMMARY_FRAG}
`;

Expand All @@ -23,19 +22,26 @@ export const GET_RECOMMENDED_PROJECTS = gql`
...ProjectSummary
}
}
${USER_SUMMARY_FRAG}
${PROJECT_SUMMARY_FRAG}
`;


export const GET_PROJECTS_NEAR_ME = gql`
query projectsNearMe {
projectsNearMe {
...ProjectSummary
id
slug
name
description
address
city
state
zip
goalAmount
duration
featuredImage
}
}
${USER_SUMMARY_FRAG}
${PROJECT_SUMMARY_FRAG}
`;


Expand All @@ -60,6 +66,12 @@ export const GET_PROJECT_BY_ID = gql`
}
}
}
tradeMasters {
id
profile {
...UserSummary
}
}
comments {
...Comments
profile {
Expand Down Expand Up @@ -93,12 +105,14 @@ export const GET_PROJECT_BY_SLUG = gql`
${USER_SUMMARY_FRAG}
${COMMENTS_FRAG}
${PROJECT_SUMMARY_FRAG}
${TASKS_FRAG}
`;


// export const GET_TRADES_BY_PROJECT_ID = gql`
// query projectById($id: ID!) {

// }
// `;
export const QUERY_PROJECTS = gql`
query projects($query: String!) {
projects(query: $query) {
...ProjectSummary
}
}
${PROJECT_SUMMARY_FRAG}
`
Loading

0 comments on commit 2868f95

Please sign in to comment.