Example Error
{
"data": {
"createPhaseField": null
},
"errors": [
{
"message": "Field type not found with id: attachments",
"locations": [ ... ],
"path": [ ... ],
"extensions": {
"code": "RESOURCE_NOT_FOUND",
"correlation_id": "91c444b53a0a596e-IAD"
}
}
]
}
Why this Happens
This error occurs when the input provided for a field (in this case, attachment
) does not match the expected format or validation rules. Common causes include:
- Typographical Errors
- Misspelling the field type (e.g.,
"attachments"
instead of the correct"attachment"
). - Extra characters or incorrect pluralization (e.g.,
"emails"
vs."email"
).
- Misspelling the field type (e.g.,
- Case Sensitivity
- Using uppercase letters (e.g.,
"Attachment"
instead of"attachment"
). Pipefy field types are case-sensitive and must be lowercase.
- Using uppercase letters (e.g.,
- Invalid Field Type
- Attempting to use a custom or non-existent field type (e.g.,
"rating"
instead of"number"
).
- Attempting to use a custom or non-existent field type (e.g.,
- Missing information
- If you attempt to send a required field as empty or omit it entirely from the arguments, the request will fail. Ensure all mandatory fields are included and properly filled out to avoid errors.
How to Fix It
-
Verify the Field Type Spelling
-
Double-check the
type
argument for typos. -
Example Fix:
-
- type: "attachments" # wrong + type: "attachment" # correct
-
-
-
Check Valid Field Types
-
Pipefy supports specific field types:
-
- assignee_select - attachment - checklist_horizontal - checklist_vertical - cnpj - connector - cpf - currency - date - datetime - due_date - email - id - label_select - long_text - number - phone - radio_horizontal - radio_vertical - select - short_text - statement - time
-
-
-
Use Correct Casing
-
Ensure the
type
argument is lowercase.-
- type: "Attachment" # wrong + type: "attachment" # correct
-
-
Example Corrected Mutation
The error in the original query occurred because "attachments"
is invalid. The correct type for an attachment field is "attachment"
:
mutation {
createPhaseField(input: {
phase_id: "334655689"
type: "attachment" # Corrected from "attachments"
label: "Supporting Documents"
description: "Attachments or documents supporting the suggestion."
required: false
}) {
phase_field {
id
}
}
}