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.

Type policies broken starting 3.3.0

See original GitHub issue

Intended outcome: Trying to query a typePolicy field should work

Actual outcome: The query is always loading

How to reproduce the issue: Try to query a typePolicy field, e.g

export default new InMemoryCache({
  typePolicies: {
    Query: {
      fields: {
        foo: () => 'foo'
      }
    }
  }
})


  // .... in a component
  const { data, ...rest } = useQuery(gql`query Foo { foo @client }`)
  // rest.loading is always true and data is always undefined

Versions apollo-client ^3.3.0 / ^3.3.6 / ^3.4 beta

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
Remownzcommented, Mar 21, 2021

I can confirm. We also use multiple cache.policies.addTypePolicies. We also have to downgrade to 3.2.x.

1reaction
Banou26commented, Apr 24, 2021

@benjamn Any updates on this ? Still a bug on 3.3.15 which prevents anyone using cache.policies.addTypePolicies to upgrade above 3.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating to Apollo Client 3.0 - Apollo GraphQL Docs
WARNING: Apollo Client 3.0 is a major-version release that includes breaking changes. If you are updating an existing application to use Apollo Client...
Read more >
Bug - Unable to open project (Unity Hub 3.3.0 is broken)
Hi! When I open a project, the editor splash screen shows then it closes (crashes) and Unity Hub restarts. Thats all, no error...
Read more >
MimeKit 3.3.0 problem when using from a Service Library on ...
When i use MimeKit 3.3.0 to create a new MimeMessage the MimeMessage result = new MimeMessage(); throws an exception: The type initializer ...
Read more >
3.3.0 - Apache Daffodil
Release Notes. This release contains some bug fixes, improvements, and a new charset. Bug Fixes. [DAFFODIL-2267] Warnings emmited on pre-compiled parsers ...
Read more >
Streams FAQ | Confluent Documentation
General¶ · What programming languages are supported?¶. The Kafka Streams API is implemented in Java. · Why is my application re-processing data from...
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