Closed amiroous closed 3 months ago
Another issue is that responseReducer
isn't engaged either so the mocks should return the data in the shape the response reducer would have it, which could be used as a workaround if the shape of that data is an object. Otherwise it will be converted to an object. This code does it.
Steps to reproduce:
useQuery
with responseReducer
that returns an arrayresponseReducer
is calledI think it would be less painful and technically more correct if LocalGraphQLClient
overrode requestViaHttp
and requestViaWS
instead of request
.
Package
graphql-hooks
Environment
graphql-hooks
version: 6.4.0react
version: 17.0.2Description
using LocalGraphQLClient with passing localQueries for test purposes is not calling the middleware functions and causing the middleware not being tested completely
How to reproduce
Suggested solution (optional)