Share on
·

Why We Added Vercel Support and What It Means for Developers

Adam Benhassen & Michael Skorokhodov·

A few weeks back, we received a request on our public Slack channel to consider Vercel support, allowing Inigo’s middleware to run as part of Vercel Route. We decided to act on it, and this post describes the steps we took to add Inigo middleware support for Apollo Server JS running on Vercel—and what this means for our customers.

Background

At Inigo, our mission is to simply manage GraphQL workflows for developers. We’re excited to announce our latest milestone: support for Vercel, enabling seamless integration of Inigo's JavaScript middleware with Vercel’s powerful serverless platform. Vercel is a leader in serverless hosting and the company behind Next.js, the most popular framework for React. Supporting Vercel ensures developers can leverage Inigo’s capabilities in a cost-effective and cutting-edge environment.

Why Vercel?

Vercel is more than just a serverless platform—it’s a cornerstone of modern web development. Here's why supporting Vercel became a priority for us:

  • Next.js Leadership: Vercel is the creator of Next.js, a semi-full-stack framework combining React, server-side rendering, database access, and API generation in one seamless experience.
  • Cost-Effective Hosting: Compared to AWS, Vercel offers a more straightforward solution without sacrificing performance, making it a favorite among modern web applications.
  • Developer-Friendly Ecosystem: With an active and vocal community led by Vercel CEO Guillermo Rauch, Vercel continues to drive innovation in the development world.

What We Did to Support Vercel

Supporting Vercel required thoughtful adaptations to our middleware and tooling. Here’s what we delivered:

1. Enhanced Middleware for Next.js

We had updated our integration in order to align seamlessly with Next.js’ features:

  • Post-Response Processing of Requests: Vercel’s serverless platform does not support termination signals for background processing once a request completes. We were unable to utilize Termination Signals due to how containers are managed. This prevents any background processing after a request has been completed by immediately freezing the container if no subsequent calls are made to the same route. To address this, we leveraged Vercel’s waitUntil function, which allows analytics data to flush even after the request lifecycle ends (See waitUntil)

  • Middleware for Post-Response Events: Since Vercel lacks traditional shutdown signals, we forked apollo-server-integration-next to enable waitUntil functionality in multiple areas, allowing developers to execute custom code after responses are dispatched (See github).

2. Built a Sample Project

To accelerate onboarding, we created a sample project (github) showcasing integration with:

  • App Router: The modern, recommended approach in Next.js.
  • Page Router: For teams using legacy routing methods.

Why Inigo’s Approach Stands Out

  • Rapid Response: A customer request inspired this initiative, and our team delivered quickly to meet their needs.
  • Developer-Centric Solutions: Middleware enhancements and forked integrations tailored specifically to the needs of developers using Vercel.
  • Open Communication: Transparency and responsiveness through public channels ensured alignment with developer expectations.

Next Steps

We’re excited about this integration and committed to making it even better:

  • Contributing to Apollo’s Integration Library: Proposing middleware improvements to enhance flexibility for Vercel users (See github).

Get Started with Inigo on Vercel

Our Vercel support ensures developers can combine the power of Inigo with the simplicity of serverless hosting. Ready to try it out? Explore our sample project and start enhancing your GraphQL workflows today.

Final Thoughts

With this integration, Inigo continues to make GraphQL workflows faster, simpler, and more scalable. Whether you’re leveraging Vercel’s cutting-edge platform or managing a multi-cloud environment, Inigo is here to optimize your GraphQL development experience.

Happy GraphQL-ing, The Inigo Team

Ready to accelerate your GraphQL adoption?
Start Inigo for free
*No credit card needed
Join our newsletter