Skip to content

Instantly share code, notes, and snippets.

View nikolasburk's full-sized avatar
😑

Nikolas nikolasburk

😑
View GitHub Profile
const resolvers = {
Query: {
hello: () => `Hello World`
}
}
query {
user(id: "user123") {
name
}
}
{
"hello": "Hello World"
}
const result = await binding.query.user({ id: "user123" }, `{ name }`)
class App extends Component {
render() {
return <div>{this.props.data.hello}</div>
}
}
const HELLO_QUERY = gql`
query hello {
hello
}
# 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!
# import Repository from "./github.graphql"
# import Organization from "./github.graphql"
type Query {
info: String!
graphcoolRepositories(names: [String!]): [Repository!]!
graphcool: Organization!
}

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.

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]