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

Cache invalidation on only count queries doesn't work #255

Open
bitbeckers opened this issue Feb 10, 2025 · 0 comments
Open

Cache invalidation on only count queries doesn't work #255

bitbeckers opened this issue Feb 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@bitbeckers
Copy link
Collaborator

bitbeckers commented Feb 10, 2025

This query gets the cache invalidated when claiming a fraction via the allow list flow:

{
  allowlistRecords(
    where: {user_address: {eq: <USER ADDRESS>}, claimed: {eq: false}}
  ) {
    count
    data {
      claimed
    }
  }
}

This one doesn't:

{
  allowlistRecords(
    where: {user_address: {eq: <USER ADDRESS>}, claimed: {eq: false}}
  ) {
    count
  }
}

When we invalidate the cache based on supabase events, the upper query gets invalidated and when querying again gets the fresh data. The bottom query is unaffected by the invalidation and keeps showing the old data until TTL passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready
Development

No branches or pull requests

1 participant