Codykilpatrick/Celestia

Add filter by region to app

Closed this issue · 0 comments

We want users to be able to click from our selection of regions and filter to whatever one they are in.

This involved modifying the query in the graphql-queries.ts file to dynamically take a region_id as input:

export const ALL_PREDICTIONS_QUERY = gql`
  query allPredictions {
    allModelPredictAverageIncreases(condition: { regionId: 10000043, increase: false }) {
      totalCount
      edges {
        node {
          id
          regionId
          increase
          horizon
          confidence
          datePredicted
          typeId
        }
      }
    }
  }
`;

Then updating the hero list of items with the selected region_id