Skip to content

jimmaye/sw-graphql-lab

Repository files navigation

GraphQL Lab for the iOS team

Lab repo for our upcoming KDay for the iOS team

Intro

In this lab we'll first look at the demo app, discuss it's pros and cons regarding usage of the current SWAPI.co REST API. We'll then discuss how and where we can improve upon the demo app, with focus on fetching data from the backend API. Then we'll try to implement the changes discussed by using GraphQL instead.

Setup your lab

Clone this repo, and get it up and running. I've checked the entire world into the project, in case if you don't believe in CocoaPods etc. Make sure you can run the project, and you get a splashscreen with a fancy title and a familiar company logo. Then follow the instructions by Lee Byron in the section below regarding GraphQL.

Prepare yourself - GraphQL is coming (...to your machine or a project near you soon)!

You'll need a local server running the GraphQL engine, and we'll base it on the great works of Lee Byron found here: https://github.com/graphql/swapi-graphql. We can try out the parseapp instance, but keep the local as a backup if we want.

GraphQL A'hoy!

Now, convert the demo app to utilize GraphQL and all it's immense powers to fetch the data as awesome as possible.

I'm fast!

Great, convert the demo app to Swift, add more information, buttons etc.

Discussion

We'll reserve 30 minutes (ish) for a discussion regarding the pros and cons of using GraphQL as our backend API instead of the SWAPI Rest API.

Disclaimer

If you find your self annoyed of being presented with Objective-C, missing unit tests or the similar, please write all your complaints on a non-exsisting paper with imgainary ink, and send it to me in -2 years , back when I might've cared. We'll keep focus entirely on GraphQL vs Rest, not Objective-C vs. Swift, codestyle, length of skateboard and so on. However, let's try to discover if Swift+GraphQL has some nice advantages etc. Happy hacking away! :-)

About

Lab repo for our upcoming KDay for the iOS team

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published