Skip to content

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

@bitbeckers

Description

@bitbeckers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions