Skip to main content

Documentation Index

Fetch the complete documentation index at: https://deepkit-graphql.js.org/llms.txt

Use this file to discover all available pages before exploring further.

Referenced type names will be used as the name for the generated GraphQL object type.
For comparison, see inline types.

Example

interface User {
  id: string;
  name: string;
}

type UserWithoutName = Omit<User, 'name'>;

@graphql.resolver()
class UserResolver {
  @graphql.query()
  getUserId(): UserWithoutName {
    // ...
  }
}
In this example, the UserWithoutName referenced type is utilized as the object type name instead of the automatically generated inline type name OmitUsername derived from Omit<User, 'name'>.
type UserWithoutName {
  id: String!
}

type Query {
  getUserId: UserWithoutName
}
This showcases how the explicitly named referenced type contributes to the clarity and semantic coherence of the generated GraphQL object type.