Skip to content

Commit

Permalink
Integrating GroupImpactHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
jedtan committed Sep 4, 2023
1 parent ff7b622 commit 5286dd3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/groupImpactComponents/GroupImpactContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ export default createFragmentContainer(GroupImpact, {
referralDollarContribution
}
}
groupImpactHistory {
dollarContribution
tabDollarContribution
searchDollarContribution
shopDollarContribution
referralDollarContribution
dateStarted
}
}
`,
})
42 changes: 42 additions & 0 deletions src/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,9 @@ type User implements Node {

"""Current UserGroupImpactMetrics leaderboard"""
leaderboard: [leaderboardEntry]

"""User historical data related to group impacts"""
groupImpactHistory: [UserGroupImpactMetricLog]
}

"""a user's charity specific impact"""
Expand Down Expand Up @@ -1331,6 +1334,45 @@ type leaderboardEntry {
user: User
}

"""
A historical view of a specific users contribution to a GroupImpactMetric
"""
type UserGroupImpactMetricLog implements Node {
"""The ID of an object"""
id: ID!

"""The ID of the user which the UserGroupImpactMetric belongs to"""
userId: String!

"""
The micro USD amount raised for this instance of GroupImpactMetric so far by this user
"""
dollarContribution: Int!

"""
The micro USD amount raised for this instance of GroupImpactMetric so far by this user from tabs
"""
tabDollarContribution: Int!

"""
The micro USD amount raised for this instance of GroupImpactMetric so far by this user from search
"""
searchDollarContribution: Int!

"""
The micro USD amount raised for this instance of GroupImpactMetric so far by this user from shopping
"""
shopDollarContribution: Int!

"""
The micro USD amount raised for this instance of GroupImpactMetric so far by this user from referrals
"""
referralDollarContribution: Int!

"""Date the group impact metric started"""
dateStarted: Int!
}

"""The Wildfire object"""
type Wildfire {
causeName: String
Expand Down

0 comments on commit 5286dd3

Please sign in to comment.