Replies: 1 comment
-
It's just a constructor name printed by console.log. Don't worry, there's no additional data added to the array. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
type-graphql: ^1.1.1
typescript: ^4.2.4
I am trying to pass in a list of objects for my query input type. The type name is somehow getting added into the list even though I am not explicitly passing it in. Is this expected behavior? Is there a way to remove it through configuration?
Ex. I am sending in
[ { code: '1', type: '1' }, { code: '2', type: '2'}]
as the input but when I console.log the input in the resolver function, I get[ TypeName { code: '1', type: '1' }, TypeName { code: '2', type: '2'}]
. I don't want the TypeName in there because I wantinput[i]
to only result in the object.In my resolver, I have
@Arg("input", type => [TypeName]) input: TypeName[]
TypeName is defined as the following in typename.input.ts:
In Postman, I have the query set up as
Query
GraphQL Variables
Thank you for your time!
Beta Was this translation helpful? Give feedback.
All reactions