GraphQLError: Query root type must be provided

All servers running with GraphQL must have at least one @Query() to be considered a valid GraphQL server. Without it, the apollo-server package will throw an exception and the server will fail to start. This can be as simple as

@Resolver()
export class FooResolver {

  @Query(() => String)
  sayHello(): string {
    return 'Hello World!';
  }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)