Apollo-client-devtools: Running a query in GraphiQL inside dev tools renders [object Object] when error is returned

Created on 1 Jun 2020  ·  7Comments  ·  Source: apollographql/apollo-client-devtools

Like on screenshot below

Zrzut ekranu 2020-06-1 o 14 17 46

Response from server 200 - OK

[{
    "errors": [{
        "message": "401",
        "category": "server",
        "locations": [{
            "line": 2,
            "column": 3
        }],
        "path": ["..."],
        "trace": [],
    "data": {
        "result": null
    }
}]
🐞 bug

Most helpful comment

Okay, I got the issues - it's auth!
The extension should allow the user to send headers as well. GraphQL server might be doing authentication based on headers set.
If this feature doesn't exist I can volunteer to add and fix it

All 7 comments

@hinok Could let me know your version of Apollo Client, devtools version and browser version?

@jcreighton

├── @apollo/[email protected]
├── @apollo/[email protected]
├── @apollo/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
Chrome 83.0.4103.61
Apollo Client Developer Tools 2.3.0

I'm experiencing the same issue, [Object Object] for all errors:

"@apollo/client": "3.0.0-rc.12",
"@apollo/react-hooks": "3.1.3",
Chrome 83.0.4103.116 
Apollo Client Developer Tools 2.3.0

Is this resolved? I am facing the same

Okay, I got the issues - it's auth!
The extension should allow the user to send headers as well. GraphQL server might be doing authentication based on headers set.
If this feature doesn't exist I can volunteer to add and fix it

Me too, I'm facing the same

"@apollo/client": "^3.3.7",

Microsoft Edge Version 88.0.705.53
Apollo Client Developer Tools 2.3.5

It sounds like the issue here is that we need to allow custom headers. I'll move this to a feature request. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryannealmes picture ryannealmes  ·  5Comments

iki picture iki  ·  7Comments

richburdon picture richburdon  ·  4Comments

kissu picture kissu  ·  4Comments

stubailo picture stubailo  ·  4Comments