Tagged with graphql

Browse all tags

GraphQL Advances when fetching data in iOS with Swift and Apollo SDK

Dec 27, 2019

In previous articles, we discussed how to [get started](/graphql-ios-swift/) with and use [subscriptions](/graphql-subscriptions/) with GraphQL in iOS (and iPadOS, tvOS, and macOS) using Swift programming language. This time I want to discuss some advanced topics using GraphQL with Apollo SDK and Swift: usage of GraphQL fragments and Swift scalar types; optionality with GraphQL and it’s pros and cons.

Read more

How to use subscriptions with GraphQL using Apollo iOS SDK and Swift

Nov 26, 2019

GraphQL main functionality is to fetch and update data from the server. In addition to that subscriptions allow us to listen and to send messages from and to server in real-time. It is similar to regular queries, but the answer will be received when an event happens either on the server or on the client. Apollo iOS SDK library supports subscriptions and it is powered by the Swift WebSocket library [Starscream](/websockets-swift/) behind the scenes to connect to the server. Let's look at how to set it up and start using it.

Read more

Using GraphQL in iOS with Swift

Aug 28, 2019

GraphQL is an alternative to the commonly used REST API approach. When using [GraphQL](https://graphql.org/) you only get one single endpoint to the server and through that endpoint you need to specify the exact data you need. It was created by Facebook in 2012 and open-sourced in 2015. Using GraphQL in your Swift applications is not that hard. The easiest way is to use [Apollo iOS](https://github.com/apollographql/apollo-ios) client which recently has seen a lot of great improvements and bug fixes. Apollo iOS is a strongly-typed, caching GraphQL client for iOS, macOS, iPadOS, watchOS, and tvOS. It is written in Swift programming language.

Read more