Giter VIP home page Giter VIP logo

Comments (19)

wclr avatar wclr commented on March 29, 2024 1

The easiest way for me is not make such mistake and don't get this error ;)
Ok, if I will be able I will try to provide reproduction.

from apollo-server.

helfer avatar helfer commented on March 29, 2024

This should have been fixed by an earlier PR. We didn't publish a new version for that though. Will do so now. After an update this error should be gone.

from apollo-server.

wclr avatar wclr commented on March 29, 2024

I have also got the error after make this correcton

 rejection TypeError: Cannot read property 'submit' of undefined

from apollo-server.

helfer avatar helfer commented on March 29, 2024

You're saying you get this error with 0.1.5? @jbaxleyiii can you confirm?

@whitecolor: Do you have a stack trace? And can you share how you are calling apolloServer?

from apollo-server.

wclr avatar wclr commented on March 29, 2024

Yes update version 0.1.5
I get the error probably you can add illegal item to schema:

  schema {
    query: Query
    mutation: Mutation
    notation: Notation
  }

At least I get this error no this and trying access /graphql endpoint

from apollo-server.

helfer avatar helfer commented on March 29, 2024

I'm assuming you get this error in the console on the server, but it still works and you get a response on the client, right?

from apollo-server.

wclr avatar wclr commented on March 29, 2024

no, client sends error

from apollo-server.

helfer avatar helfer commented on March 29, 2024

@whitecolor: Do you have a full stack trace on the server and/or the client?

from apollo-server.

wclr avatar wclr commented on March 29, 2024
Unhandled rejection TypeError: Cannot read property 'submit' of undefined
    at ...\node_modules\apollo-server\dist\apolloServer.js:289:19
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at ...\node_modules\apollo-server\dist\apolloServer.js:287:8
    at Layer.handle [as handle_request] (...\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (...\node_modules\express\lib\router\index.js:312:13)
    at ...\node_modules\express\lib\router\index.js:280:7
    at Function.process_params (...\node_modules\express\lib\router\index.js:330:12)
    at next (...\node_modules\express\lib\router\index.js:271:10)
    at Function.handle (...\node_modules\express\lib\router\index.js:176:3)
    at router (...\node_modules\express\lib\router\index.js:46:12)
    at Layer.handle [as handle_request] (...\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (...\node_modules\express\lib\router\index.js:312:13)
    at ...\node_modules\express\lib\router\index.js:280:7
    at Function.process_params (...\node_modules\express\lib\router\index.js:330:12)
    at next (...\node_modules\express\lib\router\index.js:271:10)
    at ...\server\index.js:63:7
    at Layer.handle [as handle_request] (...\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (...\node_modules\express\lib\router\index.js:312:13)
    at ...\node_modules\express\lib\router\index.js:280:7
    at Function.process_params (...\node_modules\express\lib\router\index.js:330:12)
    at next (...\node_modules\express\lib\router\index.js:271:10)
    at expressInit (...\node_modules\express\lib\middleware\init.js:33:5)
    at Layer.handle [as handle_request] (...\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (...\node_modules\express\lib\router\index.js:312:13)
    at ...\node_modules\express\lib\router\index.js:280:7
    at Function.process_params (...\node_modules\express\lib\router\index.js:330:12)
    at next (...\node_modules\express\lib\router\index.js:271:1

from apollo-server.

helfer avatar helfer commented on March 29, 2024

That is indeed the line I thought it was. I'm not sure why this works in our tests, but not in your code. Could you provide a minimal reproduction so I can run it and debug it myself? Doesn't even have to be minimal. Any reproduction I can reasonably set up and run in a few minutes will do.

from apollo-server.

wclr avatar wclr commented on March 29, 2024

Have you tried do such thing:

 schema {
    query: Query
    mutationWrongName: Mutation
  }

and register apolloServer with such schema, then access graphiQL?

from apollo-server.

helfer avatar helfer commented on March 29, 2024

I'm 99% sure that that's not the cause of the error you're observing, so I don't think it's worth trying. The easiest way for me to find out what's going on is if you could make a repo on GitHub and instructions for how to reproduce the error with the code in that repo.

from apollo-server.

helfer avatar helfer commented on March 29, 2024

@whitecolor any update on the reproduction? I would love to see one, so we can debug this.

from apollo-server.

wclr avatar wclr commented on March 29, 2024

No, I think may be closed. If I will encounter and reproduce can be reopened then.

from apollo-server.

helfer avatar helfer commented on March 29, 2024

Okay, thanks!

from apollo-server.

linonetwo avatar linonetwo commented on March 29, 2024

Any progress on this? I get into the same problem in OSX using graphql-tools 0.4.2 but with nothing wrong in Windows.

from apollo-server.

linonetwo avatar linonetwo commented on March 29, 2024

@whitecolor are you using OSX?

from apollo-server.

helfer avatar helfer commented on March 29, 2024

@linonetwo which version of apollo-server are you using? Any code referring to tracer was removed in 0.2, afaik.

from apollo-server.

linonetwo avatar linonetwo commented on March 29, 2024

@helfer Sorry for that, I was on client side graphQL server for too long, not knowing server side server has upgraded to apollo-server. After upgrading to apollo-server, everything is fine 👍

from apollo-server.

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.