You rarely need to define the root types Query, Mutation or Subscription explicitly: they are created when you add fields to them with the @gqlQueryField, @gqlMutationField or @gqlSubscriptionField tags.

But if you want to define one of these types explicitly, to add a description, Gratos requires it to be a type alias of unknown. For example:

Query.ts
/**
 * My great description
 * @gqlType */
type Query = unknown;

/** @gqlQueryField */
export function hello(): string {
  return "Hello world";
}

Gratos enforces this because the semantics of the root value are not well defined across GraphQL server implementations. For example, some servers do not let you define a root value, whereas others use a single root value shared by all resolvers. And whether the root value should be shared by all requests or created for each request is not specified.

There are valid uses for a concrete root value, such as dependency injection, but in general dependency injection is easier with context.