-
Notifications
You must be signed in to change notification settings - Fork 249
-
I would like to skip heavy count operations for pagination results, for example total count of users, as it's doesn't need to be accurate. Currently I do it manually, but is it possible to cache it with mercurius? mercurius-js/cache
seems to work only for queries.
UsersConnection: {
total: async () => db.users.count() // cache this for some time?
}
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
mcollina
Aug 15, 2022
it works only for queries. You'll need to use https://github.com/mcollina/async-cache-dedupe directly.
Replies: 1 comment
-
it works only for queries. You'll need to use https://github.com/mcollina/async-cache-dedupe directly.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Answer selected by
ziimakc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment