menu

Apollo

A community of developers, designers and others who love Apollo and GraphQL. 🚀

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 Studio
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
Hugh Willson
@hwillson
Ellen Shapiro
@designatednerd
Jesse Rosenberger
@abernix
Jake Dawkins
@jakedawkins
James Baxley
@jamesbaxley
Jason Paulos
@jasonpaulos
Julia Black
@juliablack
Martijn Walraven
@martijnwalraven
Khalil Stemmler
@khalilstemmler
Peggy Rayzis
@peggy
Ben Church
@bnchrch
Trevor Scheer
@trevor-scheer
Martin B
@mbonnin
Adam Zionts
@zionts
Evans Hauser
@evans
Stephen Barlow
@stephen-barlow
Ashi Krishnan
@rakshesha
Danielle Man
@daniman
Michael Watson
@michael-watson
Thao
@thao
Justin Anastos
@justin-anastos
Tim Hingston
@timbotnik
Adam Torres
@adamatorres
Alisha Ehrlich
@alisha-ehrlich
Chang Wang
@cheapsteak
Claire Hough
@clairehough
David Glasser
@glasser
François Dufour
@francois-dfr
Jenn Creighton
@jenncreighton
Matt DeBergalis
@debergalis
Sachin D. Shinde
@sachin-shinde
Posts
Members
Info

useSubscription and "No more mocked responses for the query"

Hey there first of all I saw a similiar question useSubscription & mocking responses and the answer on SO. Unfortunatly this does not solve my problem (or I have no idea how to adjust my code). My Component: …

thumbsup
0
message-simple
0

Is there a way to throw an error and then refetch but getting data this time?

There is a component that fetches some data, and I want to add a button to refetch the data in case of an error. And I wondering if there is a way to test this, meaning that the first request will throw an error and the second one, after pressing the button will show data.

thumbsup
1
message-simple
3

@apollo/client/testing: Error: No more mocked responses for the query...

The @apollo/client/testing docs suggest testing a loading state by passing an empty array into <MockProvider mocks={[]} />. However, by doing this an error is returned saying there are no mocked responses for the query. Docs:…

thumbsup
1
message-simple
2

MockedProvider: How to handle multiple requests that have same variables?

Example based on https://www.apollographql.com/docs/react/development-testing/testing/ });

thumbsup
0
message-simple
0

How to test a query that can receive dynamic variables with MockProvider?

I'm using useQuery and pass some variables in first render. But user can press a button, this change some data on variables and component render again. How I can test this behavior? I'm using testing-library/react-native.

thumbsup
1
message-simple
0

Has anyone could able to figure out how to resolve this error?

Invariant Violation: Argument of passed to parser was not a valid GraphQL DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document

thumbsup
0
message-simple
5

Testing federation extensions with apollo-server-testing

Is there a good way to test federation extensions without having to do a full integration test on the federation? Would prefer to keep the tests on the service level.

thumbsup
0
message-simple
0

Error using MockedProvider: Warning: React.createElement: type is invalid...

I've been trying to get MockedProvider to work but it keeps returning undefined causing @testing-library/react to crash. I've created a repo with examples: https://gitlab.com/elijah.penney/apollo-testing-example Any idea on how I can get it to stop crashing?

thumbsup
0
message-simple
0

Mocking provider vs mocking query

Hey guys, so far from apollo docs people tend to mock the provider in order to test React Components (https://www.apollographql.com/docs/react/development-testing/testing/#mockedprovider) However I observed some people directly mocking the query with the expected result while…

thumbsup
0
message-simple
0
Deleted·51d# Testing

apollo-datasource-rest + Typescript + Jest

I am setting up a new project using Apollo, TypeScript & Jest and I'm running into some difficulty testing my datasources that extent RESTDataSource. Jest will not mock the class to be extended & much of the advice I'm coming across recommends switching to composition over…

thumbsup
1
message-simple
3