This talk was given at GitHub Universe 2016. Alongside Dan Schafer from GitHub, we discuss GraphQL, the what's and the hows, and how GitHub has launched its public GraphQL API.
Implementing and Using GraphQL Kyle Daigle Platform Interface Engineering Manager, GitHub Dan Schafer Software Engineer, Co-Creater of GraphQL, Facebook
Pains of our API • Getting the data you want can be multiple REST calls away • It’s difficult for us to release comprehensive REST responses that don’t expose too much data that’s too expensive to calculate. • When we’re forced to make a change, it’s very hard to know who it will impact • GitHub uses the API for its own integrations but not for product features
{ me { name friends(first: 1) { name events(first: 1) { name } } } } type User { name: String profilePic(size: Int = 50): Image friends(first: Int): [User] events(first: Int): [Event] }
{ me { name friends(first: 1) { name events(first: 1) { name } } } } type User { name: String profilePic(size: Int = 50): Image friends(first: Int): [User] events(first: Int): [Event] }
{ me { name attendees(first: 1) { name } } } type User { name: String profilePic(size: Int = 50): Image friends(first: Int): [User] events(first: Int): [Event] }
{ __schema { types { name fields { name type { name } } } } } type Query { me: User user(id: Int): User } type User { name: String profilePic(size: Int = 50): Image friends(first: Int): [User] events(first: Int): [Event] } type Event { name: String attendees(first: Int): [User] }
GitHub Platform Forum • Public forum to discuss early access and pre-release features • Staffed by GitHub Platform Engineers, Product Managers, and Support staff • Feedback can immediately be used by GitHub engineers • Integrators can work with each other to share novel uses and best practices
Early Access Program • We will provide a communication channel to collaboratively impact the direction and approach of a project. • We will strive to keep documentation updated, but you can expect unannounced breaking changes as we develop quickly. • We may stop or pause access to Early Access releases at any point. • You will encounter bugs and there will be reliability and stability hiccups.