-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Setup
I have AInput that contains an inner BInput field that I want to setup like this:
@gqlInputObjectType()
export class AInput {
@gqlField({
class: "AInput",
type: "BInput",
})
bInput: BInput;
constructor(bInput: BInput) {
this.bInput = bInput;
}
}
@gqlInputObjectType()
export class BInput {
@gqlField({
class: "BInput",
type: GraphQLID,
})
id: string;
@gqlField({
class: "BInput",
type: GraphQLInt,
})
quantity: number;
constructor(id: string, quantity: number) {
this.id = id;
this.quantity = quantity;
}
}
But I can't regen the code due to this error:
field bInput references BInput which isn't a graphql object
I tried setting up BInput using @gqlObjectType instead, which seems to successfully regen, but the graphql type is incorrect as it needs to be an Input type not just a generic type, so the server just errors out.
Question
Should there be a separate @gqlInputField we can use? Or is there a setup I'm missing? Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels