Graphql

From bibbleWiki
Jump to navigation Jump to search

Introduction

This is a query language for your API.

Example

A example Query and Response provides an example. It is used by

  • Facebook
  • PsyPal
  • Twitter
  • Github

Core Concepts

Data Types

  • Int signed 32-bit integer
  • Float signed double-precision floating-point value
  • String utf8 character sequence
  • Boolean true or false values
  • ID Unique identifier, Used to re-fetch an object or a the key for a cache

Types

type Author {
  id: ID,
  firstName: String
  lastName: String
  rating: Float
  numOfCourses: Int
}

Enums

enum language {
  ENGLISH
  SPANISH
  FRENCH
}