menu
Channels
# All channels
view-forward
# General
view-forward
# Apollo Angular
view-forward
# Announcements
view-forward
# Apollo Android
view-forward
# Apollo Client
view-forward
# Apollo iOS
view-forward
# Apollo Link
view-forward
# Apollo Link Rest
view-forward
# Local State
view-forward
# Apollo Platform
view-forward
# Apollo Server
view-forward
# Apollo Tooling
view-forward
# Contributing
view-forward
# Docs
view-forward
# Events
view-forward
# GraphQL Tools
view-forward
# Jobs
view-forward
# Random
view-forward
# React Apollo
view-forward
# Showcase
view-forward
# Subscriptions
view-forward
# Testing
view-forward
# Vue Apollo
view-forward
Team
Posts
Members
Info

How to unit test the ApolloProvider from @apollo/react-hooks queries using…

When using MockedProvider in tests, I get the below error is there a different MockedProvider test-utils to test the version of the hooks? Currently, I'm testing it using with the below workaround …

thumbsup
1
message-simple
19

How to test same queries but with different variables

hi i've search everywhere but i seems stuck at this. for example i have a query: in one instance it will use parameters to get specific species on the other hand it will use parameter by its color and never do both. …

thumbsup
0
message-simple
0

How to test useLazyQuery?

I love the documentation about testing react components with useQuery and useMutation. (https://www.apollographql.com/docs/react/development-testing/testing/) But I struggle when testing the useLazyQuery-hook. …

thumbsup
2
message-simple
6

How to test queries which require an authorization token?

Apollo Server Integration testing documentation shows how to test simple queries using createTestClient. If you have a query which requires an authorization token to be run, how do you pass such a token to the query so that can be tested with the above mentioned…

thumbsup
2
message-simple
4

Trouble with MockProvider and polling

Hello all, yesterday I tried to write a story in storybook using a component fetching data with useQuery. It also use startPolling to refresh itself. In order to make it work in storybook I wrapped my story with a MockProvider and a mock. So works well for the first call, but as…

thumbsup
0
message-simple
0

Testing with fragments

How should I set up my MockedProvider when my component needs to read data from cache using readFragment?

thumbsup
0
message-simple
0

Is there a simpler way to test?

Reading through the full stack tutorial tests it seems there is a lot of boilerplate to get a reliable/consistent test suite up. How necessary/reliable is all of the test setup in the fullstack tutorial? I am using apollo-server-koa, pg, and knex and trying to write integration…

thumbsup
2
message-simple
0

[Possible bug] Testing multiple mutations: second mutation never reached

Hi, I need help with this problem. I've been testing my registration component which uses 3 mutations, 1 for user registration, 1 for authentication to obtain the JWT token, and a local @client third to set the current user into localStorage. The problem is, when I set all the…

thumbsup
0
message-simple
0

How do you unit test the result of a mutation in vue & apollo

I posted on stackoverflow and am really struggling to test the behavior of a successful mutation with Apollo. https://stackoverflow.com/questions/59339110/testing-graphql-apollo-and-vue-js

thumbsup
0
message-simple
0

How do I get rid of these act console errors"

I'm converting my code to use apollo hooks and I'm running into problems when updating the unit test. I can't get rid of this no matter what I do. I've wrapped it in the act module and updated my version of react to latest to make sure I have the async version.

thumbsup
0
message-simple
2