How to reference types in DQL schema definition?

Cuz your schema needs to be like this

type User {
  User.name
}

type Pet {
  Pet.name
}

User.name: string @index(hash) .
Pet.name: string @index(term) .

DQL Schema is different from GraphQL Schema. In GraphQL this pattern comes automatically, in DQL you have to do it manually.