Questions tagged [apollo-testing]

3 questions
4
votes
0 answers

NestJS how to get apolloClient from the graphql module to test using `apollo-server-testing`?

Although the title is similar to Access to Apollo server for NestJS GraphQL test, the question itself is old and the answers in that question all address behaviour that no longer seems to exist in nestjs. I have followed the PR here…
SebastianG
  • 8,563
  • 8
  • 47
  • 111
1
vote
1 answer

Is there a more accurate way to use for testing apollo requests

I've got my set up passing in mocks={mocks}. everything is working, all good. the issue is I have a form that whenever any part of it is edited then this makes a mutation, which returns a response and updates the total. say for…
Red Baron
  • 7,181
  • 10
  • 39
  • 86
0
votes
1 answer

How to mock the useApolloClient hook?

Apollo Client provides this doc for testing APIs with MockedProvider, but it doesn't seem to mock the useApolloClient hook. When I use MockedProvider with my functional component and run the test, I get this error even though I've added…
covfefe
  • 2,485
  • 8
  • 47
  • 77