File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,15 @@ const link: ApolloLinkFromClient = ApolloLink.from([
3131
3232const apolloOptions : ApolloClientOptions < NormalizedCacheObject > = {
3333 link,
34- cache : new InMemoryCache ( ) ,
34+ cache : new InMemoryCache ( {
35+ typePolicies : {
36+ // NOTE: Singleton types that have no identifying field can use an empty
37+ // array for their keyFields.
38+ FilteredStats : {
39+ keyFields : [ ] ,
40+ } ,
41+ } ,
42+ } ) ,
3543 assumeImmutableResults : true ,
3644 defaultOptions : {
3745 query : {
Original file line number Diff line number Diff line change @@ -19,11 +19,13 @@ import {
1919const COMMUNITY_STATS = gql `
2020 query CommunityStats {
2121 communityStatsLatest {
22+ id
2223 totalContributors
2324 totalUserGroups
2425 totalSwipes
2526 }
2627 communityStats {
28+ id
2729 totalContributors
2830 totalUserGroups
2931 totalSwipes
Original file line number Diff line number Diff line change @@ -26,18 +26,21 @@ import styles from './styles.css';
2626const USER_STATS = gql `
2727 query UserStats($pk: ID!, $limit: Int!, $offset: Int!) {
2828 user(pk: $pk) {
29+ id
2930 userId
3031 username
3132 userInUserGroups(pagination: {limit: $limit, offset: $offset}) {
3233 count
3334 items {
35+ id
3436 userGroupId
3537 userGroupName
3638 membersCount
3739 }
3840 }
3941 }
4042 userStats(userId: $pk) {
43+ id
4144 stats {
4245 totalSwipes
4346 totalSwipeTime
@@ -54,7 +57,9 @@ const USER_STATS = gql`
5457const FILTERED_USER_STATS = gql `
5558 query FilteredUserStats($pk: ID!, $fromDate: DateTime!, $toDate: DateTime!) {
5659 userStats(userId: $pk) {
60+ id
5761 filteredStats(dateRange: { fromDate: $fromDate, toDate: $toDate}) {
62+ id
5863 areaSwipedByProjectType {
5964 totalArea
6065 projectType
You can’t perform that action at this time.
0 commit comments