Better HN
topnewbestaskshowjobs
Log inSign up

brblck

44 karma · joined Sep 14, 2016 (10y ago) · 6 submissions

[ my public key: https://keybase.io/brandonblack; my proof: https://keybase.io/brandonblack/sigs/_60cbTwI-2CVveh0cAFwWx6E2dVvkplON7inAOhRVrY ]
Submissions

comment 9y ago · link · parent

Needs more black.

comment 10y ago · link · parent

Yup. That's something we can handle internally, under the hood to batch database requests into a single query for all edges. This problem is actually easier to solve in GraphQL then it is with a traditional REST API.

comment 10y ago · link · parent

I theory a GraphQL API can operate verison-less utilizing things like deprecation notices and field aliasing to smooth over any rough edges. Once we see calls on a certain thing reach zero and sustain that level, we can actually remove it and never have to bump a version anywhere.

That's the dream. We'll see how reality plays out.

For reference, we actually launched with some deprecated fields (see "databaseId" on the "Issue" type -- database IDs will be phased out for global relay IDs eventually) if you want to see what they look like.

comment 10y ago · link · parent

One really great feature of GraphQL (which GitHub doesn't support yet in this alpha, but we plan to) is the ability to store queries for execution later. This lets us optimize and plan for the data and volume of requests being generated from a given query. Other soon-to-be-added features like subscriptions where we only return the data you need when it changes help a lot on this front as well.

comment 10y ago · link · parent

This definitely enables a lot of opportunity to do both smarter querying and smarter caching on the back-end.

While you can indeed perform larger, more complex requests, GraphQL by nature forces queries to explicitly ask for everything you want to get back. As a result, we're not wasting any capacity giving you back a bunch of data for an entire object that you don't need like we would in a normal REST API request.

The thing that I'm most excited about with all this is the fact that we're building new GitHub features internally on GraphQL as well. This means that unlike a traditional REST API, there will no longer be any lag time between features in GitHub and the GitHub API.

API is a first-class product now. API consumers get features as soon as everyone else!

Please make sure to give us feedback during this alpha stage! https://platform.github.community/

comment 10y ago · link · parent

Special shout out to the open-source contributors and members of the community who helped us build this:

https://github.com/rmosolgo/graphql-ruby

https://github.com/shopify/graphql-batch

https://github.com/github/graphql-client

https://github.com/graphql

We <3 your work and are thrilled to have built this with you!

Please make sure to give us feedback during this alpha stage! https://platform.github.community/