Comments (19)
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.
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.
I have also got the error after make this correcton
rejection TypeError: Cannot read property 'submit' of undefined
from apollo-server.
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.
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.
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.
no, client sends error
from apollo-server.
@whitecolor: Do you have a full stack trace on the server and/or the client?
from apollo-server.
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.
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.
Have you tried do such thing:
schema {
query: Query
mutationWrongName: Mutation
}
and register apolloServer with such schema, then access graphiQL?
from apollo-server.
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.
@whitecolor any update on the reproduction? I would love to see one, so we can debug this.
from apollo-server.
No, I think may be closed. If I will encounter and reproduce can be reopened then.
from apollo-server.
Okay, thanks!
from apollo-server.
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.
@whitecolor are you using OSX?
from apollo-server.
@linonetwo which version of apollo-server are you using? Any code referring to tracer was removed in 0.2, afaik.
from apollo-server.
@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)
- Apis that have their requests cached dont need to make unnecessary auth token fetches
- Document known mitigated security issue in `@koa/cors` for AS3 users HOT 1
- Update `@koa/cors` dependency for AS3 (or why we don't intend to) HOT 2
- Share and modify variables between Express and the GraphQL/Apollo server HOT 1
- Error: ApolloServer<BaseContext>' is not assignable to type 'ApolloServer<ExpressContext> HOT 3
- callback function for onSchemaLoadOrUpdate when upgrading from AS v3 to AS v4 HOT 3
- Allow plugins to throw meaningful GraphQL errors
- Getting started tutorial has typescript issues...
- Delay when subscription is closed on client side of the router when using callback
- Documentation and dynamic cache control feature of Apollo leverages incompatible GraphQl type interface. HOT 4
- Disabling introspection should also disable "Did you mean ...?" HOT 3
- Undefined 'code' TypeError within errorNormalize HOT 2
- Link broken for plugin
- The server crashes if a promise with deferred handling rejects while another promise is trying to resolve HOT 7
- Upgrade Express version to mitigate the Open Redirect Vulnerability in Express.js for malformed URLs, specifically targeting versions below 4.19.2. HOT 1
- Marking text works unreliable HOT 1
- CodeSandbox setup is failing HOT 1
- Passing context to datasource loses it's reference, meaning, we cannot mutate the context between the resolver and datasources. HOT 2
- Provide basic CSS formatting for markdown rendered in description fields for the sandbox
- Redirect in Context HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-server.