The Best Collected Details on the GraphQL Specification — Overview & Language

The Humans

Licensing, Notation, Grammar, & Syntax

Description of GraphQL

  • Product-centric — The idea behind GraphQL is focused on the product first. With emphasis around what the user interface, and specifically the front-end engineers, want and need for display and interaction with an application’s data. Extending this it behooves one to design GraphQL APIs around data storage mechanisms that encourage this type of user interface first, and arguably even user experience first design practices. This often includes databases like Dynamo DB, Apache Cassandra, or AWS Neptune as systems that necessitate designing from the front end into the data. Where as it draws conflicts on those that try to follow tightly coupled database first design practices with systems like relational databases. However, that identified as a characteristic, note that it doesn’t preclude design first practices — like GraphQL is designed for — with databases like relational databases. It just provides an avenue of conflict for those that want data first design since that is an entrenched practice with relational databases.
  • Hierarchical — GraphQL is oriented toward the creation of and manipulation of hierarchical views. So much that GraphQL requests are structured as such.
  • Strong-typing — Every GraphQL service defines an application-specific type system and requests are made in that context. This design principle is also why one will find regular use of TypeScript with GraphQL, specifically in the JavaScript web world. The two are matched very well to manage and extend strong-types to the systems using the GraphQL API. This also extends well, albeit with more mapping specifics needed to ensure types match. This design principle provides a solid level of type safety for GraphQL use within application development.
  • Client-specified response — Based on this design pattern GraphQL provides a published capability for how clients will, or can, access the API. These requests provide field-level granularity. With that provided, the client can then provide exactly what it needs to retrieve from this field-level granularity. This particular characteristic is what gives GraphQL it’s famed
  • Introspective — The ability to introspect against an API and derive what is available, and in many cases derive how or what to do with what is available, is a very powerful feature of GraphQL APIs. All of the intricate power of SOA Architectures without the conflagrations of XML, SOAP, and WSDLs. Arguably, one could say that GraphQL is SOA right? Ok, getting off in the weeds here, let’s keep rolling!

Language

  1. query
  2. mutation
  3. subscription
mutation {
getThisWidget(widgetId: 666) {
widget {
widgetValues
}
}
}
query {
widget {
widgetValues
}
}
{
widget {
widgetValues
}
}

--

--

--

Software dev, data, heavy metal, transit, economics, freethought, atheism, cycling, livability, beautiful things & adrenaline junkie.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Raster Data in Python — Part II: Working with Geographic Coordinates

How to Store Data in Python

Google Is Wrong, The Real State Management Choice Is Not Provider

New Wallet Update — Nimiq

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adron Hall

Adron Hall

Software dev, data, heavy metal, transit, economics, freethought, atheism, cycling, livability, beautiful things & adrenaline junkie.

More from Medium

GraphQL Subscriptions with JavaScript and Apollo Server

How to Bundle *.d.ts Declaration Files with API-Extractor

Setup React Relay in an Nx Mono Repo

Export To The File System (Save As…) + Fallback In TypeScript