Skip to content

Commit 646c48d

Browse files
authored
Some updates to the comparison with Apollo Server (#1796)
* Some updates to the comparison with Apollo Server * Add link to migration guide * Better line breaks
1 parent 20f3c2a commit 646c48d

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

website/src/pages/v3/comparison.mdx

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,37 @@ This comparison highlights the main differences when using Yoga instead of Apoll
1010
### No Framework-specific Packages
1111

1212
One of the goals of `graphql-yoga` is to have as few `graphql-yoga` packages as possible.
13-
Yoga is designed around the W3C Request/Response specification (often just referred to as ["Fetch API"](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)),
13+
That's why Yoga's overall architecture was designed around the W3C Request/Response specification (often just referred to as ["Fetch API"](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)),
1414
which is already adopted by deno, cloudflare workers, and browsers.
1515

1616
For Node.js environments and frameworks (which unfortunately do not have full W3C Request/Response support), graphql-yoga comes with a small compatibility layer for making it work.
1717

18+
Read more about the underlying technology [here](https://the-guild.dev/blog/fetch-for-servers).
19+
1820
You only need to search for [`apollo-server-` on NPM](https://www.npmjs.com/search?q=apollo-server-) to see how many variants and packages there are for apollo and how hard it is to maintain.
1921

2022
### Run anywhere
2123

2224
As mentioned in the above paragraph `graphql-yoga` is built around W3C Request/Response which is supported in all major serverless/worker/"serverful" JavaScript environments.
25+
2326
Apollo Server plans to drop active support for cloudflare workers and [pushes it onto the community](https://github.com/apollographql/apollo-server/issues/6034).
24-
GraphQL Yoga will continuously support all platforms and runtimes and
27+
28+
GraphQL Yoga will continuously support all platforms and runtimes **wihtout any changes in your code** and
2529
Furthermore, Yoga has a full end to end testing suite that actually deploys to all those runtimes in order to ensure integrity and prevent unexpected issues.
2630

31+
Current list of supported and tested platform:
32+
33+
Node ([Express](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-express), [Fastify](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-fastify), [Koa](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-koa), [NestJS](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-nestjs), [SvelteKit](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-sveltekit)), [AWS Lambda](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-aws-lambda), [Cloudflare Workers](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-cloudflare-workers), [Deno](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-deno), [NextJS API Routes](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-nextjs), [Bun](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-bun) and [more](https://www.the-guild.dev/graphql/yoga-server/v3/integrations/z-other-environments)..
34+
2735
### Powerful Plugin System
2836

29-
Envelop’s powerful GraphQL plugin system, that is unfortunately not fully compatible with Apollo Server.
30-
There is still no further follow-up from the apollo maintainers over [on the Apollo Server and envelop discussion](https://github.com/apollographql/apollo-server/discussions/5541).
37+
GraphQL Yoga is built on top of [Envelop](https://envelop.dev/) - the powerful GraphQL [plugin system](https://www.envelop.dev/plugins).
38+
39+
Unfortunately Apollo Server is not fully compatible with it, there is still no further follow-up from the apollo maintainers over [on the Apollo Server and envelop discussion](https://github.com/apollographql/apollo-server/discussions/5541).
3140

32-
GraphQL Yoga builds upon envelop and, futhrermore, has a default plugin preset enabled for ensuring best practices for a performant (parse and validation caching) and secure GraphQL (e.g. though error masking) server by default.
41+
GraphQL Yoga builds upon envelop, which means it can use the whole plugin ecosystem of Envelop, including rate limiting, caching, Auth, tracing and monitoring and basically any feature GraphQL servers in production needs.
42+
43+
Futhrermore, Yoga a default plugin preset enabled for ensuring best practices for a performant (parse and validation caching) and secure GraphQL (e.g. though error masking) server by default.
3344
If you want to opt-out of some or all of these plugins that is also possible.
3445

3546
Yoga is fully customizable for your needs!
@@ -38,15 +49,18 @@ You can find a list of all available Envelop plugins over on [the envelop plugin
3849

3950
### Full Support of the GraphQL over HTTP specification
4051

41-
GraphQL Yoga is fully compatible with the GraphQL over HTTP specification (including the incremental delivaery over HTTP specification).
52+
GraphQL Yoga is fully compatible with the GraphQL over HTTP specification (including the incremental delivery over HTTP specification).
4253

4354
### File Uploads
4455

45-
GraphQL Yoga supports [file uploads out of the box](/v3/docs/features/file-uploads#enable-file-uploads-in-graphql-yoga).
56+
GraphQL Yoga supports [file uploads out of the box](/v3/docs/features/file-uploads#enable-file-uploads-in-graphql-yoga) and fully supports the [GraphQL-Multipart-Request](https://github.com/jaydenseric/graphql-multipart-request-spec).
57+
58+
### Real time and GraphQL Subscriptions over Server-Sent-Events (SSE)
4659

47-
### GraphQL Subscriptions over Server-Sent-Events (SSE)
60+
The current version of GraphQL Subscriptions by Apollo hasn't received any major updates in the last couple of years.
4861

49-
GraphQL Yoga supports [GraphQL Subscriptions over Server-Sent-Events (SSE)](/v3/docs/features/subscriptions#subscriptions) out of the box without the need of any additional libraries.
62+
GraphQL Yoga supports [GraphQL Subscriptions over Server-Sent-Events (SSE)](/v3/docs/features/subscriptions#subscriptions) out of the box with fully typed implementation without the need of any additional libraries.
63+
It also support GraphQL Subscriptions over WS and in addition to that, we added the ability to use GraphQL Live Queries.
5064

5165
### Bundle Size and lean Dependencies
5266

@@ -65,6 +79,25 @@ GraphQL Yoga only has a fraction of the dependencies of Apollo Server, and in ge
6579

6680
GraphQL Yogas APIs are designed for code-splitting and supported by popular bundlers.
6781

82+
### Better runtime performance
83+
84+
GraphQL Yoga has significantly less latency and much higher requests rate than Apollo Server in all popular benchmarks.
85+
86+
### GraphiQL
87+
88+
While Apollo Server is shipping with their proprietary and less updated hosted IDE and removed the default open source GraphiQL,
89+
GraphQL Yoga ships with the latest and greatest from the open source, Foundation backed [GraphiQL IDE](https://github.com/graphql/graphiql) and we support and contribute to the project.
90+
91+
### Compatibility with Apollo Federation
92+
93+
GraphQL Yoga not only officially supports the Federation spec as a subgraph, but also can act as the Apollo Gateway server.
94+
With GraphQL Yoga you can use Apollo Federation together with all the plugins of Envelop, so you can benefit from both ecosystems:
95+
https://www.graphql-yoga.com/docs/features/apollo-federation
96+
97+
We believe GraphQL Yoga is the best Apollo Federation Server out there.
98+
99+
The migration from Apollo Server to Yoga Server is easy and you can find [instructions here](https://www.the-guild.dev/graphql/yoga-server/v3/migration/migration-from-apollo-server).
100+
68101
## GraphQL Yoga and GraphQL Helix
69102

70103
We are maintainers of both libraries today.

0 commit comments

Comments
 (0)