next.js – Cannot use GraphQLSchema from another module or realm in NextJS 14
(Creating this because I searched for ages and then found an answer)
I wanted to use type-graphql together with apollo-server-lambda and nextjs (because I wanted to use nextjs api routes for local developmnt, while having lambdas serving my API in production).
I got the error:
Error: Cannot use GraphQLSchema [...] from another module or realm.
Ensure that there is only one instance of "graphql" in the
node_modules directory. If different versions of "graphql" are the
dependencies of other relied on modules, use "resolutions" to ensure
only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Read more here: Source link
