apollographql / apollographql/fullstack-tutorial
Error object in Integration test is different compared to error in playground
- Lingua principale
- TypeScript
- Stelle
- 1.2k
- Fork
- 808
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia dal caso di test di integrazione in PR #153, nello specifico dal diff collegato alla riga 103, e segui l'errore di datasource attraverso errorFromResponse e le chiamate query/mutation di apollo-server-testing. Confronta il risultato con l'errore del playground ed esegui il test di integrazione interessato. Il lavoro è completato quando il test riproduce il problema di datasource con la stessa struttura o lo stesso messaggio di errore del playground.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- graphql, node.js, typescript
- Ambito
- api, testing
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100