Coder Social home page Coder Social logo

Comments (14)

KeithGillette avatar KeithGillette commented on May 14, 2024 6

This issue still occurs with Apollo Client Developer Tools 2.0.6 and [email protected] for responses with an error but not a data property.

from apollo-client-devtools.

wawhal avatar wawhal commented on May 14, 2024 5

This still happens with apollo-link-ws.

from apollo-client-devtools.

jbaxleyiii avatar jbaxleyiii commented on May 14, 2024 2

This is fixed in the newest build!

from apollo-client-devtools.

PaulRBerg avatar PaulRBerg commented on May 14, 2024 2

Using [email protected] and [email protected] and this issue still exists.
.

from apollo-client-devtools.

glasser avatar glasser commented on May 14, 2024 1

@evans Now you have fixed the apollo-link issue, can you check to see if this is fixed?

from apollo-client-devtools.

zenVentzi avatar zenVentzi commented on May 14, 2024 1
"@apollo/react-hooks": "^3.1.3",
    "@apollo/react-ssr": "^3.1.3",
 "apollo-cache-inmemory": "^1.6.5",
    "apollo-client": "^2.6.8",
    "apollo-link": "^1.2.13",
    "apollo-link-context": "^1.0.19",
    "apollo-link-error": "^1.1.12",
    "apollo-link-http": "^1.5.16",

image

Actual response taken from the Network tab:

{"errors":[{"message":"Context creation failed: Invalid scheme ","extensions":{"code":"UNAUTHENTICATED","exception":{"stacktrace":["AuthenticationError: Context creation failed: Invalid scheme ","    at ApolloServer.context (/mnt/c/Users/zen_ventzi/Documents/s.engineering/devbeat/qnary-api/src/index.ts:133:15)","    at ApolloServer.<anonymous> (/mnt/c/Users/zen_ventzi/Documents/s.engineering/devbeat/qnary-api/node_modules/apollo-server-core/src/ApolloServer.ts:737:24)","    at Generator.next (<anonymous>)","    at fulfilled (/mnt/c/Users/zen_ventzi/Documents/s.engineering/devbeat/qnary-api/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)","    at process._tickCallback (internal/process/next_tick.js:68:7)"]}}}]}

from apollo-client-devtools.

mattgabor avatar mattgabor commented on May 14, 2024 1

Seeing this with:

    "@apollo/client": "3.0.0-rc.12",
    "@apollo/react-hooks": "3.1.3"

from apollo-client-devtools.

glasser avatar glasser commented on May 14, 2024

Ah, this seems to specifically happen with certain kinds of errors, like unknown fields. So this query

query {
  xxx
}

triggers the issue.

from apollo-client-devtools.

glasser avatar glasser commented on May 14, 2024

Looks like the difference between this kind of response which looks good:

{"data":{"app":null},"errors":[{"message":"Requested resource was not found [not-found]","locations":[{"line":1,"column":2}],"path":["app"]}]}

and this which doesn't

{"errors":[{"message":"Cannot query field \"xxx\" on type \"RootQuery\".","locations":[{"line":1,"column":12}]}]}

from apollo-client-devtools.

glasser avatar glasser commented on May 14, 2024

May also be the difference between a 200 response and a 400 response.

from apollo-client-devtools.

glasser avatar glasser commented on May 14, 2024

Confirmed that it definitely works with AC 1.0.

from apollo-client-devtools.

glasser avatar glasser commented on May 14, 2024

OK, this issue needs to be fixed in apollo-link-http, not just in the devtools. It's because of this code which doesn't appear to have an equivalent in the 1.0 createNetworkInterface.

apollo-server turns any response with error and no data into a 400 and apollo-link-http turns that into an error which doesn't actually have the JSON on it. (It does put the response on the error, but the JSON was already read so you can't re-read it from the response.)

It also misleadingly puts an error on a field called parseError even when it doesn't have to be a parse error.

from apollo-client-devtools.

glasser avatar glasser commented on May 14, 2024

Filed apollographql/apollo-link#178 for the underlying issue.

from apollo-client-devtools.

 avatar commented on May 14, 2024

I've also observed this behaviour in apollo-link-http when used in graphql-bindings

from apollo-client-devtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.