For comparison, see referenced types.
Example
Pick<User, 'id'> of the getUserId query is not a valid object type name.
To resolve this, non-alphanumeric characters are excluded, resulting in the generated name PickUserid.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
In TypeScript, an inline type refers to a type definition declared directly at the point of use without assigning it a separate name.
interface User {
id: string;
email: string;
}
@graphql.resolver()
class UserResolver {
@graphql.query()
getUserId(): Pick<User, 'id'> {
// ...
}
}
Pick<User, 'id'> of the getUserId query is not a valid object type name.
To resolve this, non-alphanumeric characters are excluded, resulting in the generated name PickUserid.
type PickUserid {
id: String!
}
type Query {
getUserId: PickUserid
}
Was this page helpful?
