0

In my mutation I need to upload a file to an Asset Field. Can this all be done in one mutation or do you need to upload the file in one mutation and assign the id to the asset field in a secondary mutation?

mutation($document:FileInput) {
   save_sectionHandle_entryType_Entry(document:$document) {
      document {
          id
          title
          url
      }
   }
}

// Params
{
    document: { fileData: Base64 file data, filename: String }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.