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

Add optimism data queries #1146

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Add optimism data queries #1146

merged 2 commits into from
Oct 16, 2023

Conversation

CarlosQ96
Copy link
Collaborator

@CarlosQ96 CarlosQ96 commented Oct 6, 2023

For project queries add the following:

export const fetchTotalDonors = `
  query (
    $fromDate: String
    $toDate: String
    $fromOptimism: Boolean
  ) {
    totalDonorsCountPerDate(
      fromDate: $fromDate
      toDate: $toDate
      fromOptimism: $fromOptimism
    ) {
      total
      totalPerMonthAndYear {
        total
        date
      }
    }
  }
`;

export const fetchTotalDonationsUsdAmount = `
  query (
    $fromDate: String
    $toDate: String
    $fromOptimism: Boolean
  ) {
    donationsTotalUsdPerDate (
      fromDate: $fromDate
      toDate: $toDate
      fromOptimism: $fromOptimism
    ) {
      total
      totalPerMonthAndYear {
        total
        date
      }
    }
  }
`;

export const fetchTotalDonationsNumberPerDateRange = `
  query (
    $fromDate: String
    $toDate: String
    $fromOptimism: Boolean
  ) {
    totalDonationsNumberPerDate (
      fromDate: $fromDate
      toDate: $toDate
      fromOptimism: $fromOptimism
    ) {
      total
      totalPerMonthAndYear {
        total
        date
      }
    }
  }
`;

export const fetchNewProjectsPerDate = `
  query (
    $fromDate: String
    $toDate: String
    $verified: Boolean
    $includesOptimism: Boolean
  ) {
    projectsPerDate(
      fromDate: $fromDate
      toDate: $toDate
      verified: $verified
      includesOptimism: $includesOptimism
    ) {
      total
      totalPerMonthAndYear {
        total
        date
      }
    }
  }
`;

@CarlosQ96 CarlosQ96 force-pushed the feature_optimism_data_queries branch from e455d62 to dd3cf6c Compare October 6, 2023 20:53
@CarlosQ96
Copy link
Collaborator Author

CarlosQ96 commented Oct 9, 2023

Hey Mohmmad this is for Ramin's Analytics Dashboard

Copy link
Collaborator

@mohammadranjbarz mohammadranjbarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CarlosQ96 LGTM

@CarlosQ96 CarlosQ96 merged commit 2bcb161 into staging Oct 16, 2023
@CarlosQ96 CarlosQ96 deleted the feature_optimism_data_queries branch October 16, 2023 14:41
@CarlosQ96
Copy link
Collaborator Author

@RamRamez here are the same queries with the filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants