Skip to content

Instantly share code, notes, and snippets.

View nikolasburk's full-sized avatar
😑

Nikolas nikolasburk

😑
View GitHub Profile
@nikolasburk
nikolasburk / DepthFirstSearch.java
Created May 30, 2015 19:26
Implementation of depth first search on a tree data structure (breadth first search yet to come)
public class DepthFirstSearch {
private Tree tree;
private Node result;
public DepthFirstSearch(Tree tree) {
this.tree = tree;
}
public Node depthFirstSearch(String name) {
//
// ViewController.m
// ButtonTest
//
// Created by Nikolas Burk on 08/04/16.
// Copyright © 2016 Nikolas Burk. All rights reserved.
//
#import "ViewController.h"
Relay Apollo
Built by Facebook (Check out the project on GitHub) Meteor (Check out the project on GitHub)
Frontend Technologies Requires React / React Native and configuration of Babel plugin Framework and platform agnostic (works with any JS framework such as React, Angular or Vue as well as on the native mobile platforms)
GraphQL API Requires a certain structure in the GraphQL schema Works with any GraphQL schema
Complexity Slow learning curve: Lots of powerful magic happening behind the scenes Low entrance barrier: Let's you get started quickly and involves more manual work for certain features
Flexibility Almost no flexibility, strict rules how to

Using GraphQL with the Apollo iOS client

Were you ever annoyed when working with a REST API because the endpoints didn't give you the data you needed for the views in your app? Getting the right information either required multiple server requests or you had to bug the backend developers to adjust the API? Worry no more, GraphQL and Apollo to the rescue! 🚀

GraphQL is a new API design paradigm that was open-sourced by Facebook in 2015. It introduces a new era for APIs by eliminating a lot of the ineffencies with today's de-facto standard REST. In contrast to REST, GraphQL APIs only expose a single endpoint and the consumer of the API can precisely specify what data they require with every request.

In this tutorial, you're going to build an iPhone app that helps users plan which iOS conferences they'd like to attend. You'll setup your own GraphQL server and interact with it from the app using the [Apollo iOS Client]

Using GraphQL with the Apollo iOS client

Were you ever annoyed when working with a REST API because the endpoints didn't give you the data you needed for the views in your app? Getting the right information either required multiple server requests or you had to bug the backend developers to adjust the API? Worry no more, GraphQL and Apollo to the rescue! 🚀

GraphQL is a new API design paradigm that was open-sourced by Facebook in 2015. It introduces a new era for APIs by eliminating a lot of the ineffencies with today's de-facto standard REST. In contrast to REST, GraphQL APIs only expose a single endpoint and the consumer of the API can precisely specify what data they require with every request.

In this tutorial, you're going to build an iPhone app that helps users plan which iOS conferences they'd like to attend. You'll setup your own GraphQL server and interact with it from the app using the [Apollo iOS Client]

GraphQL vs Firebase

With the variety of server-side technologies today, developers have a lot of choices when it comes to deciding what kind of backend to use for their next application.

In this article, we want to explore the differences between GraphQL and Firebase, two very popular server-side technologies.

Overview

Before diving into technical details, let's create some perspective on the two technologies and where they're coming from.

# import Repository from "./github.graphql"
# import Organization from "./github.graphql"
type Query {
info: String!
graphcoolRepositories(names: [String!]): [Repository!]!
graphcool: Organization!
}
# THIS FILE HAS BEEN AUTO-GENERATED BY "PRISMA DEPLOY"
# DO NOT EDIT THIS FILE DIRECTLY
#
# Model Types
#
type Post implements Node {
id: ID!
title: String!
class App extends Component {
render() {
return <div>{this.props.data.hello}</div>
}
}
const HELLO_QUERY = gql`
query hello {
hello
}
const result = await binding.query.user({ id: "user123" }, `{ name }`)