I use GraphQL Transform as part of AWS Amplify. Now I want to create the following mutation. However, it seems the to integer is too long. Reading the documentation it should be able to be much longer. Do you know why I always receive the error: Validation error of type WrongType: argument 'input.to' with value 'IntValue{value=49160381234}' is not a valid 'Int' @ 'createNumber
mutation createNumber {
createNumber(input: {
username: "[email protected]"
to: 49160381234
}) {
username
to
}
}
Here my schema:
type Message
@model
@auth(rules: [{ allow: owner }])
@key(fields: ["to", "from"]) # `to` as primary index and `from` as sort key.
@key(
name: "byToByTimestamp"
fields: ["to", "timestamp"]
queryField: "messagesByToByTimestamp"
) {
to: Int!
from: String!
medium: String!
messageBody: String!
timestamp: Int!
}
type Number
@model
@key(fields: ["to"]) # Each number can only exist once.
@key(
name: "byUserByTo"
fields: ["username", "to"]
queryField: "numberByUserByTo"
) {
username: String!
to: Int!
messages: [Message] @connection(keyName: "byToByTimestamp", fields: ["to"])
}
type User @model @key(fields: ["username"]) {
username: String!
numbers: [Number] @connection(keyName: "byUserByTo", fields: ["username"])
}