newbeea / nuxt3-apollo-module

33 stars 8 forks source link

feat: add cache configuration #8

Open rejifald opened 2 years ago

rejifald commented 2 years ago

Resolve #7

Add possibility to configure Apollo cache instance. For example:

...
    apollo: {
        clientConfigs: {
            default: {
                // see https://www.apollographql.com/docs/react/api/core/ApolloClient/#ApolloClient.constructor
                uri: "http://localhost:3000/api",
                cache: {
                    // see https://www.apollographql.com/docs/react/caching/cache-configuration/#possibletypes
                    possibleTypes
                }
            },
        },
    },
...