graphql-yoga preview version based on [email protected].*

Created on 29 Jun 2018  路  19Comments  路  Source: dotansimha/graphql-yoga

Since graphql-yoga is based on apollo-server and Apollo Server 2.0 currently is in release candidate stage, what about to release preview version of graphql-yoga based on [email protected].* to developers can try all new mind-blowing features that Apollo Server 2.0 offer before official stable release?

Most helpful comment

I have taken a look at both Apollo Server v2 and GraphQL Yoga to see what GraphQL Yoga still has to offer. These features still remain unique to GraphQL Yoga*:

Features already in GraphQL Yoga but made redundant by Apollo Server v2:

  • Better development experience (DX) by simplifying setup
  • CORS configuration
  • Apollo Tracing
  • Improved error formatting
  • GraphQL Playground
  • File uploads
  • Subscriptions

Perhaps this info makes the decision easier. Personally I've switched to Apollo Server since the three remaining features can be implemented with very little code if I need them, plus less dependencies is better.

I think the abstraction layer GraphQL Yoga offers is not worth it anymore, especially since it has such a high maintenance burden. However I really love that GraphQL Yoga paved the way to so many improvements in Apollo Server 馃挴.

* feel free to correct me if I forgot something.

All 19 comments

This would of course be cool to play around with.
I see Apollo Server 2.0 appears to be shipping GraphQL Playground directly this time.
So at least that aspect won't be a "drop in" upgrade.

Would be nice to hear an update on what the plans look like from the graphql-yoga authors :)

@schickling @DakshMiglani @nikolasburk @timsuchanek @marktani PTAL. :wink:

Apollo Server 2.0 shipped yesterday.

+1, I'll check on it.

I think it's going to be a big refactor. @schickling what do you think?

That's what the Apollo developers write:

Apollo Server 2.0 dramatically simplifies the API for building a GraphQL server without compromising on features. It鈥檚 also completely backward compatible, so you don鈥檛 have to worry about breaking changes when upgrading.
While it鈥檚 possible to migrate an existing server to 2.0 without any changes, we recommend changing to new patterns we鈥檙e suggesting in order to take advantage of all the latest Apollo Server features, reduce the boilerplate, and enable future flexibility. To learn how to migrate to the 2.0 from version 1.0, please read the following guide.

(source: https://www.apollographql.com/docs/apollo-server/v2/migration-two-dot.html)

If this is true, then merging #406 and #407 solve everything without the big refactor. :stuck_out_tongue_winking_eye:

They also write:

The idea to bundle all the features together into one constructor echoes Prisma鈥檚 approach with graphql-yoga. We really liked how it followed our goal of making GraphQL API development more approachable, so we decided that a similar API should be the entry point for Apollo Server 2. Thank you again to the Prisma team for the inspiration and for always pushing the GraphQL community forward.

(source: https://blog.apollographql.com/announcing-apollo-server-2-2b69fb4702ce)

It seems apollo-server@2 solves the same problems as graphql-yoga.

Why is graphql-yoga even needed if there is apollo-server@2 (graphql-yoga fulfilled its mission)?

cc @evans @abernix @helfer @martijnwalraven @stubailo @unicodeveloper @peggyrayzis

Actually, if we directly update to apollo-server 2.0, then GraphQL-Yoga won't work, because the exports and API is very different.

GraphQL-Yoga's current API is almost the same as the new Apollo Server 2.0's API.

So we would have to remove all the code on-top of Apollo-Server 1, and then rewrite most parts.

I don't really think the rewrite is worth it, because Apollo-Server@2 full-fills GraphQL-Yoga's mission.

I have taken a look at both Apollo Server v2 and GraphQL Yoga to see what GraphQL Yoga still has to offer. These features still remain unique to GraphQL Yoga*:

Features already in GraphQL Yoga but made redundant by Apollo Server v2:

  • Better development experience (DX) by simplifying setup
  • CORS configuration
  • Apollo Tracing
  • Improved error formatting
  • GraphQL Playground
  • File uploads
  • Subscriptions

Perhaps this info makes the decision easier. Personally I've switched to Apollo Server since the three remaining features can be implemented with very little code if I need them, plus less dependencies is better.

I think the abstraction layer GraphQL Yoga offers is not worth it anymore, especially since it has such a high maintenance burden. However I really love that GraphQL Yoga paved the way to so many improvements in Apollo Server 馃挴.

* feel free to correct me if I forgot something.

Thanks for the analysis, eye opener.
Agreed with your comments around Yoga, it really helped pave the way.

@FluorescentHallucinogen I'm not saying those packages are not compatible with Apollo Server, I'm saying those are built-in so they don't require any config on the user side. As for the Apollo Server 2 features, you mention, that is exactly what I'm talking about with the list that comes after "Features already in GraphQL Yoga" in my comment...

@SpaceK33z GraphQL Middleware are not Express Middleware, are they? That's the only thing I'd change in your https://github.com/prisma/graphql-yoga/issues/382#issuecomment-408390953

Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.

This shouldn't be closed due to staleness. It is still a valid issue.

Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.

Keeping the issue alive..

I think these infos should be also in the main README ?

probably

Was this page helpful?
0 / 5 - 0 ratings