-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError in 2.9.5 #3381
Comments
@hyochan Still experiencing this problem? Having the same issue. Found a solution? |
Thank you, @hyochan. Can either of you please provide a runnable reproduction? |
@trevor-scheer Well, last commit in our project is causing the problem which I've done only the package updates. I think you can easily clone that and test it. We've made our toy project in order to share same experience such as bugs like this. If this isn't enough, please tell me again. Thank you! |
I had the same problem and looks like new release 2.9.6 fixed it |
Thanks for the update @Santinell, can you please try the latest and let me know if it resolves the issue for you @hyochan? I have yet to determine the cause, or why it would resolve itself after a patch release with presumably no targeted fix. |
@trevor-scheer As you can see here same error is occuring in @trevor-scheer To test this you can easily clone our repo and |
@hyochan I was also experiencing this error. Snippet from my {
...
"dependencies":{
"graphql": "^14.5.8"
...
},
"resolutions": {
"type-graphql/**/graphql": "^14.5.8"
}
} |
- Make resolution version match installed graphql version. Related apollographql/apollo-server#3381.
@henry-young Can't believe I've missed this. Thank you! |
Getting the same error using I added the same resolution as @henry-young suggest to my |
Ok, I found the error. I passed in an object called Wrong code:
Corrected:
|
Perhaps there could be better type checking and error messaging. // apollo-core/ApolloServer.ts - Line 365
if (_schema instanceof GraphQLSchema) {
const derivedData = this.generateSchemaDerivedData(_schema);
this.schema = derivedData.schema;
this.schemaDerivedData = Promise.resolve(derivedData);
} else {
this.schemaDerivedData = _schema.then(schema =>
this.generateSchemaDerivedData(schema),
);
} Potentially a fix could be to convert non-promise schemas to a promise, resolve that schema promise, then type check the schema against GraphQLSchema. I've also seen other projects (e.g. |
I am experiencing
TypeError
inapollo-server-express@2.9.5
. I've not had this error in previous version and I can confirm this in PR. Starting to failing thebuild
incircleci
when upgrading theapollo
packages.Below is a log.
-->
The text was updated successfully, but these errors were encountered: