Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating GroupImpactHistory #534

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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