Skip to content
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

Introduction example is missing the nestjs graphql driver configuration property #77

Closed
ValentinVignal opened this issue Jan 13, 2023 · 0 comments · Fixed by #79
Closed
Labels
documentation Improvements or additions to documentation

Comments

@ValentinVignal
Copy link
Contributor

📚 Documentation

If we follow the introduction getting started/install/example from https://tripss.github.io/nestjs-query/docs/introduction/example

When running npm start, there is an error:

[12:04:08] Starting compilation in watch mode...

[12:04:13] Found 0 errors. Watching for file changes.

[Nest] 14765  - 13/01/2023, 12:04:17   ERROR [GraphQLModule] Missing "driver" option. In the latest version of "@nestjs/graphql" package (v10) a new required configuration property called "driver" has been introduced. Check out the official documentation for more details on how to migrate (https://docs.nestjs.com/graphql/migration-guide). Example:

GraphQLModule.forRoot<ApolloDriverConfig>({
  driver: ApolloDriver,
})

/Users/valentin/Perso/Projects/reproducible/node_modules/@nestjs/graphql/dist/graphql.module.js:121
            throw new Error(errorMessage);
                  ^
Error: Missing "driver" option. In the latest version of "@nestjs/graphql" package (v10) a new required configuration property called "driver" has been introduced. Check out the official documentation for more details on how to migrate (https://docs.nestjs.com/graphql/migration-guide). Example:

GraphQLModule.forRoot<ApolloDriverConfig>({
  driver: ApolloDriver,
})
    at Function.assertDriver (/Users/valentin/Perso/Projects/reproducible/node_modules/@nestjs/graphql/dist/graphql.module.js:121:19)
    at Function.forRoot (/Users/valentin/Perso/Projects/reproducible/node_modules/@nestjs/graphql/dist/graphql.module.js:36:14)
    at Object.<anonymous> (/Users/valentin/Perso/Projects/reproducible/src/app.module.ts:18:19)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/valentin/Perso/Projects/reproducible/src/main.ts:2:1)

The documentation would need to add

npm i @nestjs/apollo

and

import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';

// ...

    GraphQLModule.forRoot<ApolloDriverConfig>({
      // set to true to automatically generate schema
      autoSchemaFile: true,
      driver: ApolloDriver,
    }),

Have you read the Contributing Guidelines on issues?

Yes

@ValentinVignal ValentinVignal added the documentation Improvements or additions to documentation label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant