4

GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data.

Source: http://graphql.org/learn/

So GraphQL allows a server to implement a HTTP-endpoint that accepts queries which are only constrained by the type system defined by the server. So in some way, it can be compared to SQL. However, it does not allow nearly as complex queries as SQL does.

What I am interested in is, if the idea of having a generic endpoint that executes client-defiend queries is backed by some well known concept in computer science?

I suppose this could go in the direction of how distributed systems can communicate / exchange data but at the moment, I am having a hard time to find actual research that deals with this problem in a similar way.

So in short: Is GraphQL genuinely something new or is there some well known concept / theory behind it?

Edit: I am very well familiar with REST. My question explicitly targets the fact, if this idea of exposing data in a generic way is new or well known.

  • 2
    Wouldn't any database server quality as "a generic endpoint that executes client-defined queries"? I'm not seeing what you think might be new. – D.W. Dec 08 '16 at 17:06
  • Well, what GraphQL does is providing another layer of abstraction to limit what the client can actually do. So yes, theoretically any database server would somehow qualify but with GraphQL you are really building an API which could potentially spawn multiple databases but that is an implementation detail. – Thomas Eizinger Dec 08 '16 at 18:29
  • What I am curious about is the question if this way of building an API is something new. The thing is, I am working on my thesis right now and it would be nice to discuss GraphQL on a more abstract level. – Thomas Eizinger Dec 08 '16 at 18:34
  • @ThomasEizinger I want to emphasize D.W.'s statement. There's arguably not a lot of difference between a query language for a distributed database and GraphQL. The big difference is heterogeneity. From this perspective, GraphQL is a declarative orchestration language. Jolie is an example of an imperative orchestration language and is based on a decent amount of research. There's quite a lot of research on orchestration in general. – Derek Elkins left SE Dec 09 '16 at 00:55
  • Thank you for your comment. This is the kind of information I was looking for! – Thomas Eizinger Dec 10 '16 at 14:28
  • For completions sake, I found something in Fielding's dissertation which is related in my opinion. On page 49, section 3.4.7, he is writing about "Remote Data Access" as an architectural style that primarily deals with fetching data from remote locations, which is what GraphQL essentially boils down to. Here is a public link to the dissertation: http://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf – Thomas Eizinger Dec 20 '16 at 22:03

0 Answers0