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

QZ-509 QZ-482 Specific queries to get first N latest and popular articles #85

Merged
merged 4 commits into from
Jan 21, 2022

Conversation

itjhai-qz
Copy link
Contributor

@itjhai-qz itjhai-qz commented Jan 21, 2022

Fixes/resolves:

This PR adds two new queries to get first N latest and popular articles with @connection(key: "<key>") directive set which tells the Apollo client in consuming apps to use <key> as part of the cache keys. This prevents the result of these two queries to overwrites or being overwritten by other unrelated queries.

  • FirstFeedConcentByRecency
    This query follows the response structure of LatestFeedContent and has any pagination-related parameters (after, perPage) removed.

  • FirstPopularArticles
    This query follows the response structure of PopularArticles and has any pagination-related parameters (after, perPage) removed.

Notes:

@linear
Copy link

linear bot commented Jan 21, 2022

QZ-509 Cache conflict issue on latest stories module on homepage

Steps to reproduce:

  1. Visit https://qz.com/ → the "Latest stories" module shows 10 stories.
  2. Visit https://qz.com/latest/ and click "Load more" → the page will show 20 latest stories.
  3. Go back to the homepage, now the "Latest stories" module shows 20 latest stories instead of 10 that is expected. The same issue happens on the "Latest" flyout on the top nav.

Expected behavior:

  1. The "Latest stories" module and the "Latest" flyout on the top nav should not share the graphql result cache with the page https://qz.com/latest/. They should only show the original 10 stories.

@linear
Copy link

linear bot commented Jan 21, 2022

QZ-482 Global Homepage - new module (popular stories)

We need to create a new module for Popular stories on the right rail.

The designs are here https://www.figma.com/file/qfpPKmRp1m8vm1pAZWFD8i/Home

Copy link

@adamhooper adamhooper left a comment

Choose a reason for hiding this comment

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

Awesome sleuthing and solution :)

@itjhai-qz itjhai-qz merged commit bfb721d into main Jan 21, 2022
@itjhai-qz itjhai-qz deleted the qz-482-popular-stories-module branch January 21, 2022 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants