Reputation: 75
Im trying to add a graphql server to nestjs based on documentation, but im getting this error:
Nest can't resolve dependencies of the GraphQLModule (HttpAdapterHost, GqlModuleOptions, GraphQLFactory, GraphQLTypesLoader, ?). Please make sure that the argument at index [4] is available in the GraphQLModule context. +19ms
Error: Nest can't resolve dependencies of the GraphQLModule (HttpAdapterHost, GqlModuleOptions, GraphQLFactory, GraphQLTypesLoader, ?). Please make sure that the argument at index [4] is available in the GraphQLModule context.
Upvotes: 3
Views: 3811
Reputation: 857
Your Versions does not compatible.
From the docs itself: https://docs.nestjs.com/graphql/quick-start
WARNING
@nestjs/graphql@^9 is compatible with Apollo v3 (check out Apollo Server 3 migration guide for more details), while @nestjs/graphql@^8 only supports Apollo v2 (e.g., [email protected] package). Both versions (v9 and v8) are fully compatible with Nest v8 (@nestjs/common@^8, @nestjs/core@^8, etc.).
Upvotes: 0
Reputation: 75
After check all my dependencies i saw that the command installed me the last version of @nestjs/graphql and my @nestjs/core was incompatible i needed to update my nestjs. Thanks a lot
Upvotes: 5