Тёмный

Apollo Server V4 Breaking Changes: Time To Move Away? 

Roy Derks
Подписаться 1,8 тыс.
Просмотров 5 тыс.
50% 1

Опубликовано:

 

25 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@davidglasser
@davidglasser Год назад
Hi Roy! Thanks for your attention here! I'm the tech lead of Apollo Server (whose comment you showed midway through the video). I'm not here to convince you to stay on Apollo Server - if you're happy with another GraphQL server, that's great! I do want to address a few small inaccuracies in your video, though. - Apollo Server 2/3 supported 10 web environments: a standalone server, 5 Node frameworks (Express, Fastify, Hapi, Koa, and Micro), and 4 serverless environments (Lambda, Google Cloud Functions, Cloudflare (though this was experimental and didn't really work), Azure Functions). All web environments were supported directly inside the core: it was not possible for anyone to add integrations with new environments. As you can imagine, the core team were not actually experts on these 10 different web environments, which made it challenging to ensure we were actually providing the best and most native integration for each environment. Apollo Server 4 only ships with Standalone and Express out of the box, but community integrations already exist for all of those Node frameworks other than Micro, plus several frameworks that were not supported by AS2/3 such as Next.js and Nuxt/H3. (Lest you mourn the loss of apollo-server-micro, as far as we could tell almost no AS2/3 users actually used Micro and the vast majority of apollo-server-micro users were integrating that package with Next.js based on one confused tutorial despite Next.js not actually using Micro; we're happy that AS4 supports Next.js directly.) There's support for AWS Lambda as well, and Azure/GCP are in progress (or can be easily supported via a project like `@h4ad/serverless-adapter` that turns any Express app into a serverless app for all these platforms - we're just deciding on the best way to document this). While these packages will be community-supported going forward, we did work closely with those community members to help them write and set up these packages, because we know it's important that they exist! (Also, the integration API is very simple: these packages are generally only about a dozen lines of code, mostly just consisting of "translate the way that my web framework represents headers into a standard data structure".) - Re data sources, most of the community data sources you link are just a dozen lines of code wrapping a standard database client and in some cases adding caching functionality. If you want to keep using them, you can - just search the migration guide for "If you want to migrate quickly to Apollo Server 4 without altering your data sources" for a dozen lines of code to keep using them. That said, I think the artificial separation between "DataSources" and "the thousands of packages you may find on npm to let you access databases and other sources of data" was not particularly helpful to our users. None of the legacy DB datasources we link on our docs are particularly popular, presumably because most people realized that they didn't offer much of an add-on over the same mechanisms you use to talk to databases in any other server. But if you like using a wrapper around a popular DB client instead of that DB client directly (or for the DataSources that have a caching feature, you actually use the caching feature), just copy and paste a few lines from the migration guide and you can keep happily using the same packages you've been using! - I think you're misinterpreting what I said about a future ASv5. Node v12 went out of LTS in April and as soon as that happened, huge numbers of popular npm packages put out a major version bump with no change other than "we no longer support Node v12". Node v14 will go out of LTS in April 2023, and I expect that we will also seek to stop actively supporting this unsupported version of Node at this time, which means we'll presumably be releasing Apollo Server v5 at that time. My statement here wasn't "hahaha, I am excited to write another lengthy migration guide" but "in fact, the next time we put out a major version, we expect it will merely consist of 'make sure your dependencies are updated'', and perhaps we'll change some defaults that you can revert". I'm sorry my text was unclear enough that you interpreted "we are excited that the next major version change will be significantly smaller than these two" as "we look forward to making upgrades challenging again soon" but I'm sure you can update your video to fix that misreading. Thanks!
@gethackteam
@gethackteam Год назад
This is great information David! It would be amazing if this could be summarised somewhere so people upgrading to Apollo Server 4 can get the full picture. The video is a summary of how interpreted the changes to Apollo Server v4, the available information in the Apollo docs and a Reddit thread. Plus my personal opinion working with different Apollo Server versions over the years and comparable GraphQL server libraries.
@ralphdepping4004
@ralphdepping4004 Год назад
Recently went through an AS3 to AS4 upgrade across multiple servers and gateways. It was relatively painless. AS4 comes across as a "clear a few decks" release from Apollo with the intent to lay pathways for easier future developments and feature releases. The common "you're basically screwed" refrain and the reveal that building on apollo server means building on technical debt in the video comes across like FUD. I've developed software on all kinds of software frameworks (OSS, commercial, proprietary) - the AS3 to AS4 upgrade wasn't that dramatic. Of course YMMV - and for some setups there will be more disruption or work required. But the ebb and flow of intentional technical debt accumulation and clear down is a large part of any kind of sustained software development. There's a rich and growing ecosystem for GraphQL out there. Apollo, The Guid, StepZen, Wundergraph all come to mind off hand...we're spoilt to be honest. I can only speak to a very narrow set of GraphQL experiences as an Apollo user (and member of their supergraph champions slack community) - but in terms of general software frameworks/stacks it's been a solid choice.
@yannickcotten2854
@yannickcotten2854 Год назад
well major releases often introduce major changes. You suggest graphql-yoga (among others) as an alternative. well i've seen a tutorial about setting up graphql-yoga from french channel techwall that was made in march 2021 and it's deprecated too, the code to setup the yoga server has completely changed since too. I haven't looked at express in yoga, but i just figure out it's the very same story.
@davidemanuelsarabiainrecov9345
This video is inaccurate. 4 months have passed since Roy agreed he did not fully understand the details of the changes to Apollo Server 4. Yet he failed to correct it. Is this due to the fact that he works for an Apollo competitor, StepZen (now IBM)? I prefer transparency, so I'll state that our company happily uses Apollo Server and Studio. @Roy, please reconsider your ethics and update the video. In the spirit of transparency, I also have close relations with the Apollo team, have been presented at GraphQL Summit, and frequently on the Supergraph Champions weekly "think tank" style calls where we discuss roadmap, challenges from startups to enterprise, and generally geek out on everything GraphQL. But in general, I'm very committed to GraphQL and the ecosystem - beyond Apollo. @Community, if you are just embarking on your GraphQL journey or are experienced with the Apollo platform, I would recommend you take the Odyssey courses over at www.apollographql.com/tutorials/ . By going with official tutorials/courses, you'll have accurate information to build stronger projects. Regardless of the framework you end up using, you'll get to deep dive on the GraphQL spec, architecture, best practices, data modeling, and patterns that will level up your skillset. While they focus on implementing Apollo Server, the core GraphQL knowledge is applicable to all frameworks, and you'll benefit from knowing how to properly implement Apollo Server - which is a great skill for your CV given that the largest companies rely on Apollo. The courses are very well-made, fun, easy to follow, and taught by experienced software engineers from large companies. I wish I had this available when we first started on our journey with GraphQL, we would have saved a lot of headaches. @David Glasser, you're a rock star! Thanks for the outline you posted and for making it known that one confused but very popular Next.js tutorial caused so much confusion across the developer community. I hope history doesn't repeat with this video. In general, in our first months of embarking on GraphQL, our dev team encountered so many tutorials written by people who only knew frameworks at the surface level. It hurt us in the long run, but good experience on vetting the accuracy of sources of information. Also, 10000% agree with using native database drivers. In general, we see projects bloated with NPM packages that break away from best practices. I hope the Apollo team will launch a series of Apollo Server 4 videos ASAP, from migration, to architecture, and decisions like you outlined. @Roy Derks, 4 months ago, David Glasser kindly outlined in detail the inaccuracies from your video, you even acknowledge that you recorded this based on your interpretation of docs and random threads on Reddit - but you didn't make any updates. You don't even mentioning it on your video description text or updated your blog post. Obviously, it's important to be loyal to your employer StepZen, but the role of Developer Relations is to communicate and distribute accurate knowledge, not misinformation guided by a paycheck or personal opinions. Overall, it's concerning to see this from people educating the developer community. Even David recommended another library in his response on Reddit, stating that for certain use cases that was a better choice. Integrity is everything in the dev community, we shouldn't be bringing sales/marketing-style tactics into the space. When you change jobs and move to another company, this accumulation of misinformation becomes like technical debt and ultimately affects your credibility.
@gethackteam
@gethackteam Год назад
Thanks for the response. Great to hear you’re happy with your tech stack. I’m sharing opinions and a video is a moment in time. For me it doesn’t matter if someone is using X, Y or Z to build a GraphQL API. All I know is at the moment a recorded the video the communication and documentation around this Apollo Server update was confusing as hell and I’m staying away from it. As I’m working in Developer Relations I’m helping the broader community to learn more around GraphQL and surrounding technologies. IMO there are easier/better ways to build GraphQL, and Apollo hasn’t kept the developer in mind much lately. In time, I might record another video that’s more positive on Apollo. I let the tech speak for itself and people should form their own opinions.
@vredurs
@vredurs Год назад
Thanks for a great video. Do you have any input regarding @apollo/gateway? Will that work with apollo v.4?
@gethackteam
@gethackteam Год назад
I suppose so. But it heavily depends on the version as previous releases of Apollo gateway have reached end of life
@mgan59
@mgan59 Год назад
Great video and thanks for sharing these updates, I maintain some Projects built on apollo-server and don’t keep up-2-date with their roadmap, so hearing this news though disappointing it is super helpful for me to plan going forward. Thanks for the update 🙌🏻
@gethackteam
@gethackteam Год назад
Thank you Morgan! Yes definitely good to keep an eye on the roadmap of the libraries you’re using in your projects.
@vcvcvcv2912
@vcvcvcv2912 Год назад
Wow. Apollo Server has been my favorite library to build graphql. Actually did not know the graphql-expres library has been deprecated. Where can I find more info on this?
@mannyswebtutorial7022
@mannyswebtutorial7022 Год назад
Can I use typegraphql with apollo version 4? I notice whenever I install typegraphql with apollo version 4 there's an error.
@gethackteam
@gethackteam Год назад
With all the breaking changes in Apollo Server 4 I wouldn’t be surprised if this doesn’t work. Maybe try something like mercurius?
@sourdurian2839
@sourdurian2839 Год назад
i just found out they're deprecating apollo-server-express too.. wtf man.. now i've got to refactor my code .. this is frustrating as hell .. anyway thanks for sharing
@gethackteam
@gethackteam Год назад
Yes it’s quite extensive. I believe now is the best time to pack your bags and try a different GraphQL server implementation
@zehranehmetova1916
@zehranehmetova1916 Год назад
Super helpful thanks sir
@huseyin6494
@huseyin6494 Год назад
Apopllo server is out, just migrate everythign to Mercurius + fastify. This has been my choice I ever made and GraphQL development is so much better now
Далее
Exploring GraphiQL 2 Updates and New Features
9:52
Просмотров 3,7 тыс.
Купил КЛОУНА на DEEP WEB !
35:51
Просмотров 1,5 млн
How to Roll Your Own Auth
13:05
Просмотров 117 тыс.
Six Years Later, I’m Over GraphQL
34:40
Просмотров 71 тыс.
How Apollo Server works with Express
10:45
Просмотров 13 тыс.
Asking Interns How Much Money They Make
11:08
Просмотров 1 млн
GraphQL with Apollo Server 2.0
9:34
Просмотров 154 тыс.