stackshareio/graphql-cache

[BUG] Cannot use custom cache key on root-level field

thebadmonkeydev opened this issue · 2 comments

Describe the bug
A custom cache key cannot be used on a root-level field because it is skipped when there is no parent object.

gem version:
>= 0.6

graphql-ruby version:
Any

Expected behavior
The root-level field should be cached according to the custom key provided in the field definition.

Hi @thebadmonkeydev,

What does "root-level" field mean?

We might be experiencing this issue in our project too, but are not sure. We have some cache: ... fields defined on an interface type and wonder if that's the issue.