Skip to content

feat: apollo-client-upload support#669

Open
Anumide wants to merge 1 commit intonuxt-modules:v5from
Anumide:feat/apollo-client-upload
Open

feat: apollo-client-upload support#669
Anumide wants to merge 1 commit intonuxt-modules:v5from
Anumide:feat/apollo-client-upload

Conversation

@Anumide
Copy link

@Anumide Anumide commented Feb 1, 2026

🔗 Linked issue

Resolves #553

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The Nuxt Apollo module currently does not support file or Blob uploads when using useMutation, forcing developers to rely on custom workarounds or abandon the module.

This PR adds first-class support for file uploads by integrating apollo-upload-client and updating the Apollo client plugin to use an upload-enabled link by default.

What’s included

  • Adds file and Blob upload support via apollo-upload-client

  • Uses the upload link as the default httpLink

  • Introduces a useApolloUploadLink option:

    • true (default): enables file uploads
    • false: falls back to the native httpLink

This preserves backward compatibility while giving users full control.

Why this change is needed

Without this support, developers must:

  • Create custom Apollo client setups just to enable uploads(my situation and many of developers), or
  • Stop using the Nuxt Apollo module altogether

This PR removes that friction and provides an out-of-the-box solution that aligns with common GraphQL use cases.

Version compatibility

This PR uses apollo-upload-client@v18, which is compatible with the current dependency stack.

I have also prepared a separate branch using v19. It is available here:
https://github.com/Anumide/nuxt-apollo/tree/feat/v19-apollo-client-upload

Supporting v19 requires dependency upgrades, which are already being addressed in related PRs:

I’m happy to follow up with an updated PR once those changes land.

@netlify
Copy link

netlify bot commented Feb 1, 2026

👷 Deploy request for apollo-module pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 18bfb22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File upload not supported (and API doesn't allow to modify links structure)

1 participant