GraphQL hosting is not just "host a server"
A GraphQL API has hosting requirements a plain REST service doesn't. Subscriptions need long-lived WebSocket connections. Persisted queries and APQ benefit from a CDN or edge cache. Query complexity and depth limits matter for security. And because one endpoint serves everything, observability has to break down by operation, not just route. Pick a host that respects these realities.
What to look for
- WebSocket / SSE support for subscriptions (and no aggressive idle timeouts).
- Reasonable request timeouts for expensive resolvers.
- Caching options for persisted queries.
- Per-operation observability, not just per-endpoint.
- Easy attach to a database, since most GraphQL servers front a DB.
The options
| Platform | WebSockets (subs) | Scale-to-zero | Managed DB | Notes |
|---|---|---|---|---|
| Apollo GraphOS / Router | Yes | N/A (control plane) | No | Federation + managed router |
| Hasura | Yes | No | BYO | Instant GraphQL over Postgres |
| AWS AppSync | Yes | Yes | DynamoDB/RDS | Managed GraphQL on AWS |
| Fly.io / Render / Railway | Yes | Varies | Some | General app hosts |
| PandaStack | Yes | Yes (free tier) | Yes | Container app + auto-wired DB |
Managed GraphQL layers
Hasura auto-generates a GraphQL API over Postgres with subscriptions and permissions — superb if you want GraphQL without writing resolvers. AWS AppSync is the managed AWS option with built-in subscriptions and resolvers, good if you're AWS-native. Apollo GraphOS is less a host and more a federation control plane and managed router — you still need to host your subgraphs somewhere.
Hosting your own server (Apollo Server, Yoga, Mercurius, gqlgen)
Most teams write their own GraphQL server and just need a place to run it with a database. That's where general app platforms come in.
Where PandaStack fits
If you're running your own GraphQL server (Apollo Server, GraphQL Yoga, Mercurius, async-graphql, gqlgen), PandaStack is a strong home: deploy any Dockerfile or use buildpacks, get a managed Postgres/MySQL/MongoDB wired in via DATABASE_URL, and serve subscriptions over WebSockets through Kong ingress.
// Apollo Server with subscriptions — runs as a normal container on PandaStack
import { ApolloServer } from '@apollo/server';
import { WebSocketServer } from 'ws';
// Listen on the injected PORT; DATABASE_URL is provided automatically
const port = process.env.PORT || 4000;You get live logs, server-side metrics (ClickHouse), custom domains with automatic SSL, rollbacks, and deploy history. Free-tier apps scale to zero (KEDA) on spot nodes, which is great for staging GraphQL endpoints; for production subscription workloads you'll want a warm instance to avoid cold starts dropping the first connection.
Honest notes: PandaStack doesn't provide a managed Apollo Router or Hasura-style auto-generated schema — you bring your server. If you specifically want auto-generated GraphQL over Postgres, Hasura is the better tool; if you want a managed federation router, Apollo GraphOS is. PandaStack is the best fit for hand-written GraphQL servers that need a runtime plus a database.
Practical hardening
Wherever you host, protect the endpoint:
// Depth + cost limiting are non-negotiable for public GraphQL
import depthLimit from 'graphql-depth-limit';
validationRules: [depthLimit(8)]Also enable persisted queries to shrink payloads and let a CDN cache GETs, and set sensible resolver timeouts.
Decision guide
- Auto-generate GraphQL over Postgres → Hasura.
- AWS-native managed GraphQL → AppSync.
- Federation control plane → Apollo GraphOS + host subgraphs anywhere.
- Run your own server with a managed DB → PandaStack.
References
- Apollo Server docs: https://www.apollographql.com/docs/apollo-server/
- GraphQL Yoga: https://the-guild.dev/graphql/yoga-server
- Hasura docs: https://hasura.io/docs/
- AWS AppSync: https://docs.aws.amazon.com/appsync/
- GraphQL spec: https://spec.graphql.org/
---
Running your own GraphQL server? PandaStack deploys it from your repo with subscriptions over WebSockets and a managed DB auto-wired. Free tier at https://dashboard.pandastack.io