Does GraphQL make a difference in composability?

Looking back some years ago, organisations looking to build online experiences went to vendors and simply bought a website. Not long after, organisations realised that the approach didn’t actually connect with their customers. As public cloud arose in the late 2000s and vendors began to offer data and functionality over discrete APIs, what we now know of as composable IT emerged.

Gartner defined composable almost three years ago to describe the ability for organisations to build a layer of APIs from third party best vendors and applications built internally. Composable IT has enabled organisations to radically improve experience for their customers, and GraphQL is the glue making it happen – but what is it and how does it achieve this?

To start, GraphQL is a complementary layer on top of APIs that allows developers to retrieve the exact data they want, from any source (that could be APIs themselves, but also from databases and other applications). Make no mistake, this isn’t a replacement for APIs — unlike APIs, GraphQL is aimed squarely at data, both retrieving and changing it.

Front-end developers work a lot with data and GraphQL streamlines their workflow greatly by allowing them to get and work with just the data they need, no more or less. Imagine that the developers working on your eCommerce website need to get data about products for tracking inventory. Traditionally, this would involve calling for product information and the response would provide everything stored in the database.

Let’s take the example of the commerce sector with its functionality components including search, content, personalisation, and much more. By allowing all of the commerce data and functionality to be accessed over a clean API layer, retailers and brands can then easily “compose” rich, immersive experiences on any device. Whether a traditional website, smart watch, kiosk, or Internet of Things device, APIs are the universal currency in today’s digital world.

Composable IT as a concept is great but it’s not without its challenges. APIs are easy for internal teams and third-party vendors to build and expose but they can pose challenges to clients.

APIs, REST APIs, specifically, suffer from some further issues:

· Over-fetching – accidentally requesting too much data from an API. For example, retrieving all 50 product attributes over a smart watch application

· Under-fetching – having to request more data because the client didn’t request enough the first time. Retrieving a product’s average rating but then accidentally forgetting to retrieve the first five reviews is an example of under-fetching

· Lack of discoverability – REST isn’t a specification and therefore lacks any form of discoverability or introspection. Clients have no idea which APIs are available

· Inconsistent authorisation and authentication – vendors and internal teams routinely offer different authorisation and authentication schemes, which puts the onus on the client to figure out. Rendering a single page on a website may require a call to APIs from a dozen or more vendors

APIs are unequivocally amazing, but they are built by and for the producers of the APIs – not the clients that consume the APIs.

With GraphQL, you just make a single query, specifying exactly what data you want to retrieve. The GraphQL layer then makes requests to the individual APIs (from the server-side) to fulfil the request. As a developer, you get a single response containing everything you need to render your new product detail page. Think of GraphQL like SQL, where you can retrieve data from multiple database tables using one query.

The leading digital marketplace, Bikes.de who brings more than 100 specialised dealers online and offers around 5,000 bicycles and e-bikes from over 50 top brands to enthusiastic cyclists turned to GraphQL to create a minimum viable product (MVP) and launch an online marketplace for bicycles under 100 days. In addition to developing a modern front frontend quickly, they needed to connect the various ERP systems of specialised dealers to map and simplify the digital reservation and payment processes.

While Bikes.de already benefited from composable commerce for its B2B online shop, the next step was to connect its multi-dealer structure and respective ERP systems within the platform. Thanks to an API-first solution, the company was able to implement multiple purchase options quickly, such as click & reserve and click & collect. This enabled a future-ready business model to scale product variations.

The MVP launch provided a flexible infrastructure to power the different product combinations available on Bikes.de. Implementing composable commerce has led to higher speed conversions and less complexity in managing product information in the backend. At the same time, customers gained the option to configure their dream bikes easily — an appealing customer experience that drives conversions up.

The feedback from deployments is that GraphQL delivers a better experience for developers. They get the data they need because of how a reduction of resource usage minimises the requests required to get the necessary data. In combination with tight React integration, the process of building the front-end of your store becomes incredibly easy and smooth. That means less development time and accelerated pace of change — making your business nimbler and more agile, drastically improving your ability to react to changes in the market and competitive landscape.

Like most technology, GraphQL requires maintenance, but it also perfectly solves over-fetching, under-fetching, discoverability, and authorisation/authentication, and more. It’s built explicitly for client-side developers to easily retrieve data from APIs. It’s really emerged as the standard, and it is the “glue” for composability.

Kelly Goetsch Chief Strategy Officer

Kelly Goetsch is the Chief Strategy Officer at commercetools and author of four O’Reilly books on commerce technology including eCommerce in the Cloud and APIs for Modern Commerce. He is also co-founder and chairman of the MACH Alliance, a consortium of 50+ vendors dedicated to making Microservices, APIs, Cloud and Headless the default in enterprise digital experience.

Steve tells us about Zumtobel products and services

Delia Salinas • 18th March 2022

We interviewed 19 of the most relevant companies: Fujitsu, Acronis, D2IQ, Enlogic, Platform SH, Tencent Cloud, Dragos, App Gate, Total Data Centre Solutions, Incepteo, Canonical, Netskope, Cloud Q, Microsoft, Vertiv, Ionos, Mitsubishi, Ionos, Dragos