Example Error
{
"errors": [
{
"message": "Argument 'card_id' on InputObject 'CreateInboxEmailInput' is required. Expected type ID!",
"locations": [
{
"line": 21,
"column": 12
}
],
"path": [
"mutation",
"createInboxEmail",
"input",
"card_id"
],
"extensions": {
"code": "missingRequiredInputObjectAttribute",
"argumentName": "card_id",
"argumentType": "ID!",
"inputObjectType": "CreateInboxEmailInput"
}
}
]
}
Why This Happens
This error occurs when an argument is missing or invalid in the current operation, in this case card_id
as we can notice on the error message. Some common causes are:
- Missing Argument
- The argument was omitted entirely from the mutation input (e.g.,
"card_id"
).
- The argument was omitted entirely from the mutation input (e.g.,
- Typographical Error
- Misspelling the argument name (e.g.,
cardid
instead ofcard_id
).
- Misspelling the argument name (e.g.,
- Invalid ID Format
- Providing a non-numeric or non-existent card ID.
Hot to Fix It
- Include the argument
- Add the argument to the mutation input (e.g., add the
card_id
)
- Add the argument to the mutation input (e.g., add the
- Verify Spelling
- Ensure the argument is spelled exactly as it’s listed in the playground API documentation (case-sensitive).
- Use a Valid Card ID
- Confirm that the ID corresponds to an existing entity, such as a Card, Pipe, or Phase. Double-check that the entity hasn’t been deleted and that you have the necessary permissions to access it.
Example Corrected Mutation
The error in the original query occurred because the "card_id" argument was missing. We can fix it by adding the argument with a valid id:
mutation {
createInboxEmail(
input: {
repo_id: 123456789,
card_id: 987654321, # Valid Card ID
from: "[email protected]",
to: "[email protected]",
subject: "Action Required",
text: "Please review the attached document."
}
) {
inbox_email {
id
}
}
}