apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Using createFragmentRegistry throws error: makeCacheKey is not defined

Open benfeather opened this issue 1 year ago • 0 comments

Environment

  • Operating System: Darwin
  • Node Version: v22.5.1
  • Nuxt Version: 3.12.4
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: devtools, modules, apollo
  • Runtime Modules: @nuxtjs/[email protected]
  • Build Modules: -

Describe the bug

Creating a fragment registry using inMemoryCacheOptions throws an error: makeCacheKey is not defined.

CleanShot 2024-08-01 at 11 01 09@2x

CleanShot 2024-08-01 at 11 01 25@2x

CleanShot 2024-08-01 at 10 22 49@2x

If I remove the inMemoryCacheOptions configuration and include the fragment directly in the query, it works as expected.

Expected behaviour

Passing createFragmentRegistry to inMemoryCacheOptions should allow the use of fragments within GraphQL queries.

Reproduction

Here is a repo with a minimal reproduction.

Additional context

No response

Logs

No response

benfeather avatar Jul 31 '24 23:07 benfeather