News for hackers. Stuff that matters.
Re:GraphQL: A data query language by dschafer on Monday September 14, 2015 @07:42PM (#10218180)
Yep, GraphQL is agnostic as to how your data is stored. For example, https://github.com/graphql/swapi-graphql/ is a GraphQL schema that is backed by the swapi.co API. The examples at https://github.com/graphql/graphql-js/blob/master/src/__test... are backed by in-memory JSON objects. At Facebook, we have GraphQL types backed by data stored in a number of backends, including types backed by SQL tables.
Re:GraphQL: A data query language by iandanforth on Monday September 14, 2015 @07:53PM (#10218214)
I'd like to read more about the backing data stores. If you're aggregating data across a lot of different stores, it seems you could easily add what looks like a tiny piece of data to your query, but, in truth, is much more expensive on the backend.
Re:GraphQL: A data query language by TheMakeA on Monday September 14, 2015 @09:23PM (#10218484)
It's important to realize that you're essentially defining an API for your product. If something is expensive to access, you should either not expose it directly through your API, or add appropriate levels of caching to mitigate the costs.