You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/pages/v3/comparison.mdx
+42-9Lines changed: 42 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,26 +10,37 @@ This comparison highlights the main differences when using Yoga instead of Apoll
10
10
### No Framework-specific Packages
11
11
12
12
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)),
14
14
which is already adopted by deno, cloudflare workers, and browsers.
15
15
16
16
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.
17
17
18
+
Read more about the underlying technology [here](https://the-guild.dev/blog/fetch-for-servers).
19
+
18
20
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.
19
21
20
22
### Run anywhere
21
23
22
24
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
+
23
26
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
25
29
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.
26
30
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
+
27
35
### Powerful Plugin System
28
36
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).
31
40
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.
33
44
If you want to opt-out of some or all of these plugins that is also possible.
34
45
35
46
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
38
49
39
50
### Full Support of the GraphQL over HTTP specification
40
51
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).
42
53
43
54
### File Uploads
44
55
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)
46
59
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.
48
61
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.
50
64
51
65
### Bundle Size and lean Dependencies
52
66
@@ -65,6 +79,25 @@ GraphQL Yoga only has a fraction of the dependencies of Apollo Server, and in ge
65
79
66
80
GraphQL Yogas APIs are designed for code-splitting and supported by popular bundlers.
67
81
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:
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).
0 commit comments