PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

GraphQL

GraphQL

GraphQL is a query language created in 2012 by Lee Byron.

#81on PLDB 10Years Old 18.7kUsers
11Books 7Papers 1Repos

GraphQL is a data query language developed internally by Facebook in 2012 before being publicly released in 2015. It provides an alternative to REST and ad-hoc webservice architectures.. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server. Read more on Wikipedia...


Example from hello-world:
{ "Hello World" }
Example from Linguist:
# Copyright (c) 2015, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. schema { query: QueryType mutation: MutationType } type Foo implements Bar { one: Type two(argument: InputType!): Type three(argument: InputType, other: String): Int four(argument: String = "string"): String five(argument: [String] = ["string", "string"]): String six(argument: InputType = {key: "value"}): Type } interface Bar { one: Type four(argument: String = "string"): String } union Feed = Story | Article | Advert scalar CustomScalar enum Site { DESKTOP MOBILE } input InputType { key: String! answer: Int = 42 } extend type Foo { seven(argument: [String]): Type } directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT

Keywords in GraphQL

null true false query mutation subscription extend schema directive scalar type interface union enum input implements fragment on

Language features

Feature Supported Example Token
Comments
# A comment
Line Comments
# A comment
#
Lists
Union Types
union SearchResult = Human | Droid | Starship
Strings "
Integers
Interfaces
interface Character {
 id: ID!
 name: String!
 friends: [Character]
 appearsIn: [Episode]!
}
type Human implements Character {
  id: ID!
  name: String!
  friends: [Character]
  appearsIn: [Episode]!
  starships: [Starship]
  totalCredits: Int
}
type Droid implements Character {
  id: ID!
  name: String!
  friends: [Character]
  appearsIn: [Episode]!
  primaryFunction: String
}
Floats
Booleans true false
Semantic Indentation ϴ

Books about GraphQL from ISBNdb

title authors year publisher
React Quickly: Painless web apps with React, JSX, Redux, and GraphQL Mardan, Azat 2017 Manning Publications
Hands-On Full-Stack Web Development with GraphQL and React: Build scalable full-stack applications while learning to solve complex problems with GraphQL Grebe, Sebastian 2019 Packt Publishing
Full-Stack React, TypeScript, and Node: Build cloud-ready web applications using React 17 with Hooks and GraphQL Choi, David 2020 Packt Publishing
Mastering React Test-Driven Development: Build rock-solid, well-tested web apps with React, Redux and GraphQL Irvine, Daniel 2019 Packt Publishing
Visual Design of GraphQL Data: A Practical Introduction with Legacy Data and Neo4j Frisendal, Thomas 2018 Apress
Learning GraphQL Eve Porcello; Alex Banks 20180809 O'Reilly Media, Inc.
GraphQL in Action Samer Buna 20210221 Simon & Schuster
Learning GraphQL and Relay Samer Buna 2016-08-30 Packt Publishing
Craft GraphQL APIs in Elixir with Absinthe Bruce Williams; Ben Wilson 20180327 O'Reilly Media, Inc.
Full Stack Development with Angular and GraphQL Ahmed Bouchefra 2022-03-30 Packt Publishing
Full-Stack Web Development with GraphQL and React Sebastian Grebe 28-02-2022 Packt Publishing

Publications about GraphQL from Semantic Scholar

title authors year citations influentialCitations
Semantics and Complexity of GraphQL O. Hartig and Jorge Pérez 2018 51 6
An Empirical Study of GraphQL Schemas Erik Wittern and Alan Cha and James C. Davis and Guillaume Baudart and Louis Mandel 2019 19 0
Implementing GraphQL as a Query Language for Deductive Databases in SWI-Prolog Using DCGs, Quasi Quotations, and Dicts Falco Nogatz and D. Seipel 2017 14 2
Comparative Analysis Between Standards Oriented to Web Services: SOAP, REST and GRAPHQL Jaime Sayago Heredia and Evelin Flores-García and Andrés Solano 2019 4 0
morph-GraphQL: GraphQL Servers Generation from R2RML Mappings (S) Freddy Priyatna and David Chaves-Fraga and Ahmad Alobaid and Óscar Corcho 2019 4 0
Exploiting Declarative Mapping Rules for Generating GraphQL Servers with Morph-GraphQL David Chaves-Fraga and Freddy Priyatna and Ahmad Alobaid and Óscar Corcho 2020 3 0
COMPARATIVE ANALYSIS OF WEB APPLICATION PERFORMANCE IN CASE OF USING REST VERSUS GRAPHQL M. Vesić and N. Kojić 2020 1 0
yacc.html · graphql.html · groovy.html

View source

PLDB - Build the next great programming language · v2022 · Day 32 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com