Updating Entries & Draft Entries.
June 12, 2024 ยท View on GitHub
Update an Entry
You can update a Gravity Forms entry with the updateGfEntry mutation. This mutation works similarly to submitGfForm .
Example Mutation
{
updateGfEntry(
input: {
id: 1 # Either a DatabaseId or global Id.
entryMeta: {
isRead: false # Used to mark the entry as read.
isStarred: false # Used to mark the entry as 'starred'.
status: ACTIVE # Can be used to mark an entry as trash or spam.
}
fieldValues: [
{
# See the above section on using `submitGfForm`
id: 1
value: "This is a text field value."
}
]
shouldValidate: true # Whether to validate the form field values.
}
) {
errors {
id # The field ID that failed validation.
message
connectedFormField { # The full FormField object if you need more info.
id
type
}
}
entry {
# See above section on querying Entries.
id
}
}
}
Update a Draft Entry
Updating a Gravity Forms draft entry using the updateGfDraftEntry mutation follows a similar pattern to updating an entry :
Example Mutation
{
updateGfDraftEntry(
input: {
id: "f82a5d986f4d4f199893f751adee98e9"
idType: 'RESUME_TOKEN',
entryMeta: {
dateCreatedGmt: 2021-12-31 23:59:59
}
fieldValues: [
{
# See the above section on using `submitGfForm`
id: 1
value: "This is a text field value."
}
]
}
) {
draftEntry {
# See docs querying Entries.
resumeToken
}
}
}