Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Error object in Integration test is different compared to error in playground

Open
#154 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
graphql, node.js, typescript
Domain
api, testing

Research direction

Start at the integration-test case in PR #153, specifically the linked diff at line 103, and trace the datasource error through errorFromResponse and the query/mutation calls from apollo-server-testing. Compare that result with the playground error and run the affected integration test. Done means the test reproduces the datasource failure with the same error shape or message as the playground.

Written by the indexing model from the issue text.

Description

I wanted to test the error scenario for my query/mutation but I’m unable to do so. I've reproduced the issue in this PR here at this line.

Basically the problem is that when one of our datasource methods triggers an error then the errorFromResponse method is called and then the error is returned and we see that error in our playground but when you try to test it and mock the error in your test the error you get from query/mutation method from apollo-server-testing are both different.

#153

Dominant language
TypeScript
Stars
1.2k
Forks
808
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apollographql/fullstack-tutorial

All issues in apollographql/fullstack-tutorial

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.