question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apollo Client caches entire remote and local schema definition

See original GitHub issue

I am wondering when typeDefs option is set in

apollo.create({
  typeDefs: gql`type Query { isLoggerIn: Boolean! }`,
  // ... other options
})

full schema definition appears in apollo cache and it includes remote and local schema: image without typeDefs no schema definition in cache is stored.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dylanwulfcommented, Nov 25, 2019

I’ve seen this before too. I believe the introspection query is done by GraphiQL in the devtools, and that shows up when inspecting the cache.

0reactions
hwillsoncommented, Apr 28, 2021

As mentioned in https://github.com/apollographql/apollo-client/issues/5615#issuecomment-558330893, this sounds like the results of using AC Devtools. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Client-side schema - Apollo GraphQL Docs
You can optionally provide a client-side schema to Apollo Client that defines local-only types and fields. You can define completely new types, ...
Read more >
Remote Schemas – GraphQL Tools
Use executor to obtain a non-executable client schema from a remote schema using a full introspection query. introspectSchema is used to acquire ...
Read more >
Local state - Vue Apollo
Just how creating a GraphQL schema is the first step toward defining our data model on ... Instead, Apollo client should fetch results...
Read more >
Frequently Asked Questions - Apollo GraphQL Docs
This is possible because of a strongly-typed schema (type definitions). ... Apollo Graph Manager, and a client that manages local and remote data...
Read more >
Apollo Cache in a Nutshell - E.Y. - Medium
Reading and writing data to the cache · readQuery / writeQuery Enables you to use standard GraphQL queries for managing both remote and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found