Skip to content

Commit 727c861

Browse files
chore(): improve error message (driver)
1 parent e048760 commit 727c861

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/graphql/lib/graphql.module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,11 @@ export class GraphQLModule<
161161

162162
private static assertDriver(options: Record<string, any>) {
163163
if (!options.driver) {
164-
const errorMessage =
165-
'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).';
164+
const errorMessage = `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:
165+
166+
GraphQLModule.forRoot<ApolloDriverConfig>({
167+
driver: ApolloDriver,
168+
})`;
166169
this.logger.error(errorMessage);
167170
throw new Error(errorMessage);
168171
}

0 commit comments

Comments
 (0)