Comments (4)
Hey @jci-aws 👋
It looks like you're configuring variableMatcher
on the request
key, but this is not correct. This should be placed as a top-level key in the mock as specified in the documentation. If I move the variableMatcher
there, I see that the warning goes away:
const mocks = [
{
request: {
query: GET_DOG_QUERY,
},
variableMatcher: () => true,
result: {
data: {
dog: { id: "1", name: "Buck", breed: "bulldog" },
},
},
},
];
It looks like your test passes in the sandbox because you're only checking the loading
state of the component, but don't check against data
or error
. If I log the loading
, data
and error
values of your Dog
component used for the test, I see that error
is also set to the same message as the warning you're seeing in the console once its finished loading.
Hope this helps!
from apollo-client.
Thought I was going crazy. Thanks!
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.
No problem! Sometimes an outside perspective is all thats needed 😆. Glad its working for you! Have a great day.
from apollo-client.
Related Issues (20)
- refetch does not return cached data HOT 6
- PossibleTypes not working as intended HOT 5
- Infinite network requests with non-normalized objects HOT 3
- fetchMore not hitting onError and causing an infinite loop of queries HOT 3
- [Docs] refetchQueries can fetch non active queries HOT 5
- Typescript compilation error in Node context HOT 5
- I try to integrate GraphQL PHP in backend with Apollo client and React in front end) but I get an undefined post response HOT 3
- awaitRefetchQueries to wait for refetch of queries affected by cache eviction after a mutation HOT 5
- ECONNREFUSED Error When Using Apollo Client with NextJS HOT 4
- resetStore can cause to refetch unmounted/inactive queries HOT 11
- GraphQLWsLink doesn't throw ApolloError when network error happens HOT 2
- WebSocket connection to 'ws://localhost:4000/graphql' failed: HOT 2
- useFragment throws an error when a fragment has the @include directive HOT 3
- Deprecate testing utilities introduced in 3.10 in favor of graphql-testing-library HOT 2
- Why does QueryResult not contain extensions but FetchResult does? HOT 3
- Partial data returned on error after resetting cache HOT 2
- Type error returning `IGNORE` object when using a generic `TypedDocumentNode` mutation HOT 2
- Documentataion: mutaitonHookOptions.ignoreResults requires additional clarification HOT 1
- @apollo/client reactive var state changes are not reflecting across libraries HOT 7
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.