I am trying to create an object with a relationship.
I am using the auto generated amplify mutations
When I create an object without the relationship the operation succeeds. When I create an object with the relationship the operation fails.
The error message I get is
"The variables input contains a field name 'customer' that is not defined for input object type 'CreateCreditcardInput' "
The auto generated mutation is below.
export const createCreditcard = `mutation CreateCreditcard($input: CreateCreditcardInput!) {
createCreditcard(input: $input) {
id
number
expiration
customer {
id
firstName
lastName
phone
address1
address2
city
state
postcode
email
creditcards {
nextToken
}
}
payment {
id
paymentType
creditcard {
id
number
expiration
}
orderAmount
order {
id
date
orderStatus
}
}
}
}
`;