What should the `amount: {type: "..."}` be to represent a number for an `int` in the database?

This topic was automatically generated from Slack. You can find the original thread here.

hey! i’m testing this prop that is an int in our database, and wondering what the amount: {type: "..."} should be (line 9), to represent a number? the error message is Invalid value for argument "input.amount", expected type "Int" thanks!! i’ve tried type: "integer" , "number" , and "int"

Hello , I think you’re passing the amount as string in your GraphQL query with the quotes "${this.amount}" , maybe you can just put ${this.amount}

ah good catch! still get the error for invalid value

changed the type to string and no quotes, looks like that did it :smile:

Then I think you might need to parse the this.amount to number in javascript first, before passing it in your GraphQL query?

thanks!

:+1: