nuxt-modules / apollo

Nuxt.js module to use Vue-Apollo. The Apollo integration for GraphQL.
https://apollo.nuxtjs.org
MIT License
955 stars 198 forks source link

Using createFragmentRegistry throws error: makeCacheKey is not defined #630

Open benfeather opened 3 months ago

benfeather commented 3 months ago

Environment

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