/plushcap/analysis/algolia/algolia-engineering-integrating-third-party-apis-into-graphql-with-apollo-client

Integrating third-party APIs into GraphQL with Apollo Client | Algolia

What's this blog post about?

Developers often use GraphQL to manage data exchanges between the back and front ends of their applications. However, in some cases, using an external API alongside GraphQL can be more beneficial. This article discusses how to integrate a cloud-based search API with GraphQL without going through it. The author presents two approaches: using the API on the front end as a secondary datasource or using it on the back end behind the GraphQL API. They chose the former approach, which allowed them to maintain a single front-end datasource and achieve faster search results. To do this, they introduced an Algolia-to-Apollo Client interoperability layer that enabled data injection from Algolia into their Apollo client cache. This solution provided consistent developer and user experiences while maintaining the benefits of using GraphQL for other data sources.

Company
Algolia

Date published
March 18, 2022

Author(s)
David Lee

Word count
1653

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.