Allow submitting files in the submitWebform mutation

Created on 31 January 2025, about 1 month ago

Problem/Motivation

In the 1.x branch it was possible to upload files to use in a webform submission, but this had to be done in a separate request.

When we implement file uploads in the 2.x it would be a good idea to simplify this, and allow file submissions to be included in the submitWebform mutation. It could look something like this:

mutation submitWebform(
  $id: String!
  $elements: [WebformSubmissionElement]
  $files: [WebformSubmissionFile]
  $sourceEntityId: String
  $sourceEntityType: String
) {
  messengerMessages
  submitWebform(
    id: $id
    elements: $elements
    files: $files
    sourceEntityId: $sourceEntityId
    sourceEntityType: $sourceEntityType
  ) {
    ...webformSubmissionResult
  }
}
Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇧🇬Bulgaria pfrenssen Sofia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024