Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

No more mocked responses for the query: mutation #2258

Closed
scottmcpherson opened this issue Aug 7, 2018 · 3 comments
Closed

No more mocked responses for the query: mutation #2258

scottmcpherson opened this issue Aug 7, 2018 · 3 comments
Labels
blocking Prevents production or dev due to perf, bug, build error, etc.. has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository

Comments

@scottmcpherson
Copy link

scottmcpherson commented Aug 7, 2018

Intended outcome:
For tests to pass without cryptic errors

Actual outcome:

/Users/scottmcpherson/Documents/Development/React/react-graphql-apollo-semanticui-starter/client/node_modules/react-scripts/scripts/test.js:20
  throw err;
  ^

Error: No more mocked responses for the query: mutation createPublicTask($input: CreatePublicTaskInput!) {
  createPublicTask(input: $input) {
    id
    title
    __typename
  }
}

How to reproduce the issue:

  1. You can clone the repo and use this commit [here]https://github.com/scottmcpherson/react-graphql-apollo-semanticui-starter/tree/91c19c55ae9a0ce2df72245ff9f61deb0fefb14c).
  2. cd into client folder
  3. Install deps
  4. run yarn test

Here's the test file that's failing

Version
*"apollo-boost": "0.1.10"
*"react-apollo": "2.1.9"

Similar to the closed out issue #617

@ghost ghost added blocking Prevents production or dev due to perf, bug, build error, etc.. has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository labels Aug 7, 2018
@escapiststupor
Copy link

Has this been resolved?

@jellyninjadev
Copy link

@escapiststupor It is working fine, check out testing mutation section over Apollo docs.
What I've found is mocked provider does not work properly in Componed wrapped with withApollo wrapper.

@miamollie
Copy link

@SenhorBardell were you able to confirm that this is related to components wrapped in withApollo? Did you find any solution? Running into the same thing atm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocking Prevents production or dev due to perf, bug, build error, etc.. has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository
Projects
None yet
Development

No branches or pull requests

4 participants