-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty responses using MockedProvider and custom resolvers #4520
Comments
I'm also getting this warning in a Nuxt project using apollo-client 2.5.1 |
Here the same. I have done migration from apollo-boost to apollo-client because I need to apply middleware. I think this warning is necessary for apollo-boost, but I do not understand why I'm getting it in apollo-link. If I rollback to version: { I'm not getting this warning, it happens only from 2.5.0 version. |
Has anyone been able to solve this ? |
A fix for this is in place, and will be coming in the next patch release of
And just to add - the warning message above is going to change to the following, in the next patch release of Apollo Client (see #4550 for details):
|
Also experiencing this issue. |
Nothing on this? |
I'm getting this warning "Found @client directives in query but no client resolvers were specified. You can now pass apollo-link-state resolvers to the ApolloClient constructor." for apparently no reason? **** EDIT **** Updated apollo-boost to ^0.3.1 which removed the warning. |
If anyone gets here because of the console warning, without using |
Having the same issue, everything is properly configured and my tests pass, but I get dozens of warnings about the @client directive in Jest |
My tests don't pass and I get this error message, the query on
|
Hi all, FWIW I am getting the same issue. Basically I am posting the following query:
Going through the source, I put a breakpoint on MockLink's requestToKey - and the query that it received was:
Something in the pipeline is stripping the This is a problem, as I am using Storybook to simulate my components. |
This appears to happen when the MockLink is created, not when it's queried - at that point, the queries seem to go through intact. |
If you have local resolvers try adding them to your MockedProvider as follow
|
So basically mock @client through sham resolvers?
…On Thu, Aug 22, 2019, 6:21 PM Marouane Elaich ***@***.***> wrote:
If you have local resolvers try adding them to your MockedProvider as
follow
<MockedProvider resovlers={resolvers}>
<Component>
</MockedProvider>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4520?email_source=notifications&email_token=ABCJEF757PFRTVGQQFQK4Z3QF24JPA5CNFSM4G3IGZW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45T5QQ#issuecomment-523976386>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABCJEFYNBGOXBF4DHXHTV5LQF24JPANCNFSM4G3IGZWQ>
.
|
Same similar problem here. I have this query:
and on use this mock:
I didn't get any result. Only using a resolver:
I was able to get data. This looks like an issue to me. resolver shouldn't be required if you specify the query result. I was using:
|
See #4520 (comment) for a solution. Thanks! |
Migrated from apollographql/react-apollo#2825 (comment):
The text was updated successfully, but these errors were encountered: