Skip to content

Commit

Permalink
Merge branch 'master' into sunday-nt-1924-comment-data-model
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkariang committed May 17, 2021
2 parents 73d331c + 0a5d4ba commit ba29361
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
23 changes: 22 additions & 1 deletion app/src/main/graphql/fragments.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ fragment reward on Reward {
rewardType
}

fragment comment on Comment {
id
author {
...user
}
body
deleted
parentId
createdAt
}

fragment shippingRule on ShippingRule {
cost {
... amount
Expand All @@ -95,9 +106,12 @@ fragment shippingRule on ShippingRule {
fragment user on User {
name
id
imageUrl(blur: false, width: 54)
imageUrl(blur: false, width: 54),
isCreator
}



fragment amount on Money {
amount
currency
Expand All @@ -110,6 +124,13 @@ fragment location on Location {
name
}

fragment pageInfo on PageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}

fragment payment on CreditCard {
id
lastFour
Expand Down
39 changes: 39 additions & 0 deletions app/src/main/graphql/project.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,42 @@ query GetProjectAddOns($slug: String!, $locationId: ID!) {
}
}
}

query GetProjectComments($slug: String!, $cursor: String){
project(slug: $slug) {
collaborators {
edges {
node {
id
name
}
}
}
comments(after: $cursor) {
edges {
cursor
node {
authorBadges
...comment
replies {
edges {
cursor
node {
...comment
}
}
pageInfo {
...pageInfo
}
totalCount
}
}
}
pageInfo {
...pageInfo
}
totalCount
}
}
}

0 comments on commit ba29361

Please sign in to comment.