Provide better error on @client
annotation in MockLink
and missing local resolvers
#164
Labels
🐛 debugging
Feature requests that help users more easily debug issues
project-apollo-client (legacy)
LEGACY TAG DO NOT USE
🧪 testing
Feature requests related to testing
See discussion in apollographql/react-apollo#3316.
The current error provided by
MockLink
is justNo more mocked responses for the query:
followed by a dump of the query and arguments provided.While providing
mockResponses
automatically strips out@client
fields (apollographql/react-apollo#2776), there's no such happening for requests. This leads to a situation that is hard to debug, since the seamlessly removed part from one place is the thing that leads to an obfuscated error in another place.I don't know what the ideal solution is, but a few suggestions of varying quality/usefulness:
@client
field which has no associated local resolver provided@client
fields without anyresolvers
being passed without trying to match them up@client
fields from the query (similar to what happens automatically for responses)@client
fields from responses, throw an error and require the user to explicitly opt in to itThe text was updated successfully, but these errors were encountered: