News
Open Source GraphQL Client for React Hits 1.0 Release
- By Becky Nagel
- May 31, 2019
While there are several React clients for GraphQL, the popular API query language open-sourced by Facebook several years back, Seattle, Wash.-based Formidable, developer of the Universal React Query Library (URQL), said in its announcement of the beta product back in January 2018 that it wanted to release a "simpler" client that was easier to get started with, "especially for beginners," as well as provide a smaller footprint.
With the officially announced release of URQL 1.0 on Friday, the developers said they've changed their vision slightly, although the goal is still to make URQL easy to get started and work with.
"The initial version of URQL attempted to hit the sweet spot between these two approaches. It made it easy to get started, and provided all the functionality we needed in simple GraphQL projects. But as we worked with various GraphQL applications, we began to understand...every project has slightly different requirements, and supporting them all leads to inevitable complexity," the company explained in the launch announcement.
"Instead of going down the same path, we wanted to keep the core of URQL small and easy to work with, and provide an extensibility mechanism that allows app authors...to scale and customize their GraphQL library to suit their needs."
The developers said they've done this through the introduction of a new extensibility mechanism called "Exchanges."
Like Apollo's links (another React client for GraphQL), it handles the GraphQL requests, but according to the URQL developers, "all logic" for these queries are built into URQL's Exchanges: "Exchanges are an operation pipeline that allows you to customize and augment every aspect of the GraphQL client from how data is cached to how components receive their data."
The release comes with a number of prebuilt Exchanges, including ones designed to handle network requests, deduplication of in-flight requests and cache-focused requests, among others.
"The great thing about URQL Exchanges is that they are flexible, composable and interchangeable," the developers commented. "We've already had some great suggestions from our users, and we look forward to an ecosystem of Exchanges growing as the community begins to adopt the new version."
More information on what URQL 1.0 offers users can be found in the links above. Documentation for URQL can be found here. You can download the product on GitHub here.
About the Author
Becky Nagel serves as vice president of AI for 1105 Media specializing in developing media, events and training for companies around AI and generative AI technology. She also regularly writes and reports on AI news, and is the founding editor of PureAI.com. She's the author of "ChatGPT Prompt 101 Guide for Business Users" and other popular AI resources with a real-world business perspective. She regularly speaks, writes and develops content around AI, generative AI and other business tech. Find her on X/Twitter @beckynagel.