Trouble with type-graphql migrating from apollo server 3 to 4 #1419
Unanswered
Oskarikor98
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Glob path for resolvers will be removed in v2.0 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to migrate from apollo server 3 to 4 before the end of life in October 2023. As of right now I'm facing a couple of issues with the process and the issues seem to be related to type-graphql. Any guidance is greatly appreciated.
Case 1:
I upgrade the apollo server to the latest (4.3.1) and both type-graphql remain at 1.1.1 & graphql remain at 15.3.0. What happens is the mutations I have will work as intended unless there is an error. So lets say I have login mutation that won't find a user -> it will crash. I believe this is due to how the error handling works in apollo server 4 as mentioned in #1397
Case 2:
I upgrade the apollo server to the latest as well as type-graphql to 2.0.0-beta.1 and graphql to 16.6.0. Now the my service refuses to start giving me the same error as mentioned here: #1393 (comment)
In my case it should not be a typo as the path remains unchanged. Here's how I call buildSchema:
const apolloServer = new ApolloServer<MyContext>({ schema: await buildSchema({ resolvers: [__dirname + "/migration/*.ts"], }), });
I have been reading through quite a few issues and discussions as well as apollo server documentation and am still clueless. Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions