Author: Raj

  • React: How to use Apollo with ‘Union Types’ in GraphQL

    React: How to use Apollo with ‘Union Types’ in GraphQL

    Apollo is one of the most popular React library to work with GraphQL APIs. However they don’t have native support when your APIs contain union types. Let’s look at an example API that contains union types and how we can work with them using Apollo. Assuming you have an API like this: that returns this…