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!';
}
}