![]() ![]() I attribute urql’s thorough docs to why it has such a low issue count. Without great docs, there will be more confusion among the community over how to use it and how it works internally. Having great documentation is a key feature for any open-source library. There are a lot of little things that add up to a much better developer experience, especially for newcomers. ![]() Why use urql?įor me, urql is a breath of fresh air after working with Apollo Client for so long. Formidable is the agency behind urql, and they care about creating applications in fast and maintainable ways, compared to trying to funnel users into using their products. When a tool is designed well and with features the community wants, fewer issues are created and there is less of a need for pull requests. I started to look elsewhere for a GraphQL Client that had a more happy and cohesive community. Click here to see the full demo with network requests This is one of the negatives of the open-core business model. The company wants you to get familiar with Apollo Client and then buy into their products, not truly open-source software in my opinion. This sort of behaviour indicates to me that Apollo is using open-source merely for marketing and not to make their product better. Apollo seems unfocused on building the great client package the community wants. Looking deeper, you can see a large amount of issues open, bugs taking months to fix, and pull requests never seem to be merged from outside contributors. That’s true, but it gives you the same feeling as a code smell - you know something isn’t right. “But issue count doesn’t correlate to code quality!” is what you may say to me. Bye Apollo Client □, hello urqlĪs I’m writing this, the Apollo Client Github repository issue count stands at 795. When you stack Apollo Client and urql against each other, you’ll start wondering why Apollo Client has been so popular in the first place. urql has most of the same features but also offers improvements, including better documentation, better configuration defaults, and first-party support for things like offline mode, file uploads, authentication flows, and a first-party Next.js plugin. Most of the lingo is the same as Apollo Client, which made switching from Apollo to urql fairly straightforward. It isn’t the new kid on the block - it’s been around since 2019 - but I’ve just made the switch and stand by my decision. What is urql?Įnter urql, which is a great alternative. I realized that I needed to look elsewhere for a GraphQL client library. This “bloat,” along with recently seeing how mismanaged the open-source community is, finally broke the camel’s back for me. I’ve been using Apollo Client for quite some time and have become frustrated with its caching and local state mechanisms. Sometimes libraries can be too opinionated and offer too much “magic”. Based on this, they can provide multiple advanced features, such as utilities for caching data, auto-generation of React Hooks based on operations, and optimistic mutations. ![]() How come? Because GraphQL is an opinionated API spec where both the server and client buy into a schema format and querying format. Client libraries such as urql, Apollo Client, and Relay are able to offer different capabilities than REST libraries such as Axios or fetch. Using GraphQL in your frontend application is a like playing a different ball game than when using REST. Why I (finally) switched to urql from Apollo Client ![]() Currently hacking on GraphQL services at Unity Technologies. Alec Brunelle Follow Alec is a web developer who loves to work in all areas of the stack. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |