Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

client side GraphQL query cache #335

Open
@mydearxym

Description

@mydearxym

Apollo Client has the ability to cache query in client side:

export const client = new ApolloClient({
  link,
  /* cache: new InMemoryCache(), */
  cache: new InMemoryCache(),
  connectToDevTools: true,
  /* shouldBatch: false, */
  // defaultOptions,
})

the tricky part is to refresh cache when user do some mutate operation, like create post (post list should then be update)。

the official writeQuery solution mentioned in apollo doc is complex and adjectived.

need better solution.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions