Comments (8)
Hi all 👋 This regression is related to the bug fix in #11202. We're looking into it and should have an update soon, thanks for your patience.
from apollo-client.
@bengry yes, I can view it now. I'll need to dig into this a bit more and I'm nearing the end of my day, but will take a look as soon as I can. Thanks!
from apollo-client.
Just adding a comment here to say we're experiencing the same issue, it appears our defined typePolicies
are being ignored and certain types we do not wish to normalise are being erroneously included in the cache, which then breaks several things across our tests and application, and leads to the same behaviour as seen above.
For example, we have a query that returns something similar to the below;
query TermsAndConditions {
xyz {
hasSignedTerms
}
}
Where xyz: XYZ
and type XYZ { hasSignedTerms: Boolean! }
Unfortunately the xyz
type (obfuscated here) has no identifying label/id
we can use, so we employ a strategy whereby it's type is given a keyFields: false
value.
In 3.8 this would always mean the data
property would return { __typename: 'XYZ', hasSignedTerms: true/false }
whereas within 3.9 we are seeing frequent returns of { __typename: 'XYZ' }
with the hasSignedTerms
property being omitted entirely (which then breaks things as our TS types assume it always exists, etc.).
from apollo-client.
I think the same happens with empty lists
from apollo-client.
The fix will go out in a next patch release in the next day or two - I've tested snapshot release 0.0.0-pr-11576-20240206204955
with your sandbox @bengry and the bug no longer occurs. Thank you for reporting this issue!
from apollo-client.
Hi @bengry 👋 Thanks for providing the reproduction - unfortunately I'm not able to access it:
Would you mind checking that it's shared publicly (assuming that was your intent)? Thanks!
from apollo-client.
Hi @bengry 👋 Thanks for providing the reproduction - unfortunately I'm not able to access it:
Would you mind checking that it's shared publicly (assuming that was your intent)? Thanks!
Woops, try again now please
from apollo-client.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
from apollo-client.
Related Issues (20)
- Tracking issue: `gql.tada` HOT 1
- @defer not working in React Native HOT 20
- Apollo client initiated requests since apollo client v3.9.2 in Nextjs sometimes render as undefined data HOT 9
- useFragment fails to get data from cache for an Interface, even when possibleTypes is setup correctly HOT 5
- Better types MockedResponse.newData HOT 2
- graphql union type extraction fragment doesn't get mapping field values HOT 4
- Question about using useTransition with useSuspenseQuery's refetch and fetchMore after SSR HOT 2
- Error while build the angular app with SSR HOT 1
- `ObservableQuery` `setVariables`/`reobserve` with new variables reports partial data unexpectedly
- Invariant Violation: An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#%7B%22version%22%3A%223.9.4%22%2C%22message%22%3A49%2C%22args%22%3A%5B%5D%7D HOT 8
- offsetLimitPagination helper is not using cache in some cases HOT 2
- Better documentation on `queryDeduplication` HOT 1
- useFragment invalid return value in the case of null or undefined id in the from argument HOT 1
- Refetch with New Variables Overrides Other Existing Refetches HOT 3
- Increase the timeout for a request. HOT 6
- Apollo Client `MockedProvider` unable to mock alias fields HOT 6
- `client.query`, `fetchMore`, and others suffer from unhandled promise rejections
- useQuery loading state always true HOT 8
- when apollo client query failed, it exit all the process and cannot catch the error HOT 2
- Field Policies: 'undefined' return value for `read` affects other field policy `read` return values. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-client.