apollographql / apollographql/fullstack-tutorial
Error object in Integration test is different compared to error in playground
- Langage dominant
- TypeScript
- Étoiles
- 1.2k
- Forks
- 808
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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](https://github.com/apollographql/fullstack-tutorial/pull/153/files#diff-e38243b449b86e768973cba723ec7c8fR103).
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par le cas de test d’intégration de PR #153, en particulier par le diff lié à la ligne 103, et suivez l’erreur de datasource dans errorFromResponse et les appels query/mutation de apollo-server-testing. Comparez ce résultat avec l’erreur du playground et exécutez le test d’intégration concerné. C’est terminé lorsque le test reproduit l’échec de datasource avec la même structure ou le même message d’erreur que le playground.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- graphql, node.js, typescript
- Domaine
- api, testing
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100