HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
graphql
graphql-spec
HTML2015–2024
graphql / graphql-spec

graphql-spec

GraphQL is a query language and execution engine tied to any backend service.

36Distinct people
36Mentions
0Explicit recommenders
14.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

GraphQL is a query language and execution engine tied to any backend service.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year36 dated mentions

Observed mentions: 2015-07-03 20:03:00 UTC to 2024-05-19 15:07:22 UTC.

0510152015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 17 mentions; 4 submissions, 13 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC321
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC17413
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC404
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC110

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
GraphQL The GraphQL specification is edited in the markdown files found in /spec the latest release of which is published at https://graphql.github.io/graphql-spec/. The latest draft specification can be found at https://graphql.github.io/graphql-spec/draft/ which tracks the latest commit to the main branch in this repository. Previous releases of the GraphQL specification can be found at permalinks that match their release tag. For example, https://graphql.github.io/graphql-spec/October2016/. If you are linking directly to the GraphQL specification, it's best to link to a tagged permalink for the particular referenced version. Overview This is a Working Draft of the Specification for GraphQL, a query language for APIs created by Facebook. The target audience for this specification is not the client developer, but those who have, or are actively interested in, building their own GraphQL implementations and tools. In order to be broadly adopted, GraphQL will have to target a wide variety of backend environments, frameworks, and languages, which will necessitate a collaborative effort across projects and organizations. This specification serves as a point of coordination for this effort. Looking for help? Find resources from the community. Getting Started GraphQL consists of a type system, query language and execution semantics, static validation, and type introspection, each outlined below. To guide you through each of these components, we've written an example designed to illustrate the various pieces of GraphQL. This example is not comprehensive, but it is designed to quickly introduce the core concepts of GraphQL, to provide some context before diving into the more detailed specification or the GraphQL.js reference implementation. The premise of the example is that we want to use GraphQL to query for information about characters and locations in the original Star Wars trilogy. Type System At the heart of any GraphQL implementation is a description of what types of objects it can return, described in a GraphQL type system and returned in the GraphQL Schema. For our Star Wars example, the starWarsSchema.ts file in GraphQL.js defines this type system. The most basic type in the system will be Human, representing characters like Luke, Leia, and Han. All humans in our type system will have a name, so we define the Human type to have a field called "name". This returns a String, and we know that it is not null (since all Humans have a name), so we will define the "name" field to be a non-nullable String. Using a shorthand notation that we will use throughout the spec and documentation, we would describe the human type as: type Human { name: String } This shorthand is convenient for describing the basic shape of a type system; the JavaScript implementation is more full-featured, and allows types and fields to be documented. It also sets up the mapping between the type system and the underlying data; for a test case in GraphQL.js, the underlying data is a set of JavaScript objects, but in most cases the backing data will be accessed through some service, and this type system layer will be responsible for mapping from types and fields to that service. A common pattern in many APIs, and indeed in GraphQL is to give objects an ID that can be used to refetch the object. So let's add that to our Human type. We'll also add a string for their home planet. type Human { id: String name: String homePlanet: String } Since we're talking about the Star Wars trilogy, it would be useful to describe the episodes in which each character appears. To do so, we'll first define an enum, which lists the three episodes in the trilogy: enum Episode { NEWHOPE EMPIRE JEDI } Now we want to add a field to Human describing what episodes they were in. This will return a list of Episodes: type Human { id: String name: String appearsIn: [Episode] homePlanet: String } Now, let's introduce another type, Droid: type Droid { id: String name: String appearsIn: [Episode] primaryFunction: String } Now we have two types! Let's add a way of going between them: humans and droids both have friends. But humans can be friends with both humans and droids. How do we refer to either a human or a droid? If we look, we note that there's common functionality between humans and droids; they both have IDs, names, and episodes in which they appear. So we'll add an interface, Character, and make both Human and Droid implement it. Once we have that, we can add the friends field, that returns a list of Characters. Our type system so far is: enum Episode { NEWHOPE EMPIRE JEDI } interface Character { id: String name: String friends: [Character] appearsIn: [Episode] } type Human implements Character { id: String name: String friends: [Character] appearsIn: [Episode] homePlanet: String } type Droid implements Character { id: String name: String friends: [Character] appearsIn: [Episode] primaryFunction: String } One question we might ask, though, is whether any of those fields can return null. By default, null is a permitted value for any type in GraphQL, since fetching data to fulfill a GraphQL query often requires talking to different services that may or may not be available. However, if the type system can guarantee that a type is never null, then we can mark it as Non Null in the type system. We indicate that in our shorthand by adding an "!" after the type. We can update our type system to note that the id is never null. Note that while in our current implementation, we can guarantee that more fields are non-null (since our current implementation has hard-coded data), we didn't mark them as non-null. One can imagine we would eventually replace our hardcoded data with a backend service, which might not be perfectly reliable; by leaving these fields as nullable, we allow ourselves the flexibility to eventually return null to indicate a backend error, while also telling the client tha
Read the full README on GitHub

What Hacker News says

36 sources
I created a proposal for Map type but didn’t make it through. https://github.com/graphql/graphql-spec/pull/888 The issue with GraphQL is it tries to appease too many masters. Similar to jsx. The language isn’t evolving. The good thing is the spec is (almost) frozen, so there’s many implementations, the bad is it can’t encompass the flexibility of json schema can do. Going with GraphQL means you have to have good control over both client and server. And like any tool, there are new ways to shoot yourself.
In Migrating Netflix to GraphQL safely
You mean a filter to transform the query from A (say, with syntactic sugar syntax) to B (with final syntax)? I'm actually doing something similar in GraphQL by PoP, on a couple of levels: queries are decoupled into requested and executable, where they can differ in syntax, directives attached to them, and others. I wrote a bit about this strategy here: https://blog.logrocket.com/adding-directives-schema-code-fir... In addition, GraphQL by PoP does not understand the GraphQL syntax. It understands another syntax, that I've called PQL: https://graphql-by-pop.com/docs/extended/pql.html. PQL is a superset of the GraphQL query, so GraphQL by PoP transforms from GraphQL to PQL syntax and then executes it. For instance, this GraphQL query: ``` query { posts { excerpt titleES: title @translate(from:"en",to:"en") } } ``` is convert
Read the rest
ed to this: ``` posts.excerpt|title@titleES<translate(from:en,to:es)> ``` Check it out here: https://newapi.getpop.org/api/graphql/?query=posts.excerpt|t... This works great. Only issue is when there's some error when retrieving the data, and I need to return an error message with the path to the problem in the query. In that case, the path corresponds to the transformed PQL query, not the original GraphQL query. (It would be possible to have a mapping for them, token by token, but I haven't coded it) --- Btw, connected to PQL, GraphQL by PoP can support the embeddable fields feature because the PQL supports composable fields, which can be considered its superset: https://graphql-by-pop.com/docs/extended/pql-language-featur... I've also proposed composable fields for the GraphQL spec (https://github.com/graphql/graphql-spec/issues/682) but it hasn't got any support (that's why I'm now asking if embeddable fields could have some backing)
In Proposal for "Embeddable fields" in GraphQL
On a similar note, Rob Zhu had a great section in his talk about how GraphQL's typesafety (to make the API more robust) tries to address a similar problem but ends up being very nuanced in practice. Linking to the right time: https://youtu.be/djKPtyXhaNE?t=1128 TL;DR: - GraphQL is a descriptive type system not prescriptive. This means that "String" maps to JSON String maps to Javascript utf8 string, but what type that maps to for C++ is not quite clear. Because there are many different ways to represent a string. So which one do we use? As opposed to protobuf client codegen which is prescriptive and unambiguous in what you get. - Encoding custom scalars can cause some confusion because it's not clear what the spec of the custom scalar is. Although, there's been some recent work to make that a little better.[1] - Impedance mismatch with nu
Read the rest
llability and union types because support is not uniform across languages [1] https://github.com/graphql/graphql-spec/issues/635
In Robust APIs Are Weird
> Restricting the queries is backwards. You expose should only expose the few that makes sense in the domain of your app, and optimise for those. With exceptions: Preventing endless recursion: Or else it'd be possible for a client to timeout with queries [1]. In graphene recursion can be checked via `info.path`. Calculated / slow fields: Makes more sense to have dedicated objects if calculations are involved, so if they're lists/connections, there can be limits imposed for how many can be grabbed at a time. Sometimes the only way to be sure is to only allow access to these objects if they're a direct ID lookup at the root, e.g: repos(id: <ID>) -> stats -> TotalLikesForAllIssues. Assume that if cold and uncached, it could take <1s to calculate that. Imagine if we were to have that ran multiple times: User -> repos(first: 20) -> stats -> To
Read the rest
talLikesForAllIssues. So in my case I want to make the data available, but it's not always a direct mapping to SQL. And I'm also making rules inside where the client is limited in how, and how much they can query. [1] Further reading: http://facebook.github.io/graphql/#sec-Fragment-spreads-must..., https://github.com/graphql/graphql-spec/issues/91
In GraphQL Performance Monitoring Is Hard
For the latter, GraphQL itself explicitly forbids recursivity [0], as it's impossible to guarantee that in all cases the data isn't infinitely recursive, especially with cyclic queries, which could lead to a denial-of-service. Postgres has its own support for recursive queries [1], however you'd need to strap a pagination layer on top in order to make it work with GraphQL. [0]: https://github.com/facebook/graphql/issues/91#issuecomment-2... [1]: https://www.postgresql.org/docs/9.1/static/queries-with.html
In Show HN: Hasura – Fast, instant GraphQL APIs on Postgres

Showing the 15 most recent of 36 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.