6 ms·
Learn GraphQL with GitHub
- gramstrong 9y agoIf anyone is interested in jumping straight in to GraphQL, I recommend graph.cool. It was posted a while back when the service was first released. Their free developer tier is awesome, and their project tier is completely reasonable.
- x5t23 9y agoThere is also the graph.cool slack channel if you're looking for an active GraphQL community. You can usually find someone to help you out with questions there.
- pmoriarty 9y agoAny way to watch this without signing up or registering for anything? I'd just like to download the video directly, if at all possible.
- stablemap 9y agoThey put up recordings later, hosted on Vimeo; for example: https://resources.github.com/webcasts/GitHub-communicating-with-issues/ https://resources.github.com/webcasts/GitHub-communicating-w... With some digging you can get an MP4.
- wlk 9y agoProbably not, my tip is to sign up, but then wait for the recording to be available (they usually are), once a recording is posted you can see where did they post it to and then download. I do this from time to time
- jbjorge 9y agoTo all considering using graphql, let me tell you something that was unclear to me when I first tried it: If you plan to use it with a schemaless (nosql/graph) backend, graphql will force you to write a schema for it. If you can't (due to dynamic data), you will just end up forcing graphql treat your data as json-blobs with no schema. Graphql turns into a json-blob transmitter with no benefits. Also, if you have deeply nested/recursive data structures, the client performing the query needs to know just how deep it should query. This can lead to ridiculous queries if you're running on a graph db where the client doesn't know how many vertices it should traverse. REST is a better fit if the above is true for you.
- thekaleb 9y agoI believe that Falcor's JSON Graph[1] supports recursion rather well. [1]: https://netflix.github.io/falcor/documentation/jsongraph.html https://netflix.github.io/falcor/documentation/jsongraph.htm...
- xdissent 9y agoTo help solve the nested/recursive query problem, Facebook created dataloader: https://github.com/facebook/dataloader https://github.com/facebook/dataloader There's graphql integration info on the blog: http://graphql.org/blog/rest-api-graphql-wrapper/#taming-pathological-queries http://graphql.org/blog/rest-api-graphql-wrapper/#taming-pat...
- jbjorge 9y agoI probably was a bit unclear. Lets say I've got a family tree stored in a db that goes back 1000 years. Through graphql I want to find my first ancestor following all mothers backwards. The query would be: query familyTree { name, mother { name, mother { ..and so on for an unknown number of nestings } } } Dataloader solves batching of the nested query on the server, but doesn't solve the problem of not knowing what the correct number of nestings the query should have. Of course it's possible to create a new graphql endpoint for this type of query, but then we've just recreated REST in graphql.
- scottmf 9y agoHmm, you're not quite thinking in GraphQL properly. That isn't how your schema should be designed. Your mother field should resolve to a Person type, with a mother and/or ancestors field, which would be a graphql list type of the Person type. Something like this: Person { mother: Person femaleAncestors: [Person] }
- SirensOfTitan 9y agoYeah ideally ancestors would be a `connection`/`edge` with filters: ``` Person { ancestors(gender: Female, orderby: [AGE], first: 10) { node { name } } } ```
- NMDaniel 9y agoYet another tutorial about using a GraphQL client. It's nice but I think the hard part is implementing a GraphQL server. Are there any examples of a full blown GraphQL server, interpreting complex queries as SQL/NoSQL queries in a performant way?
- thejosh 9y agoCheck out the guide on Absinthe, which is an elixir library.
- iamtherhino 9y agoHere's one using Neo4j (graph databse): https://neo4j.com/developer/graphql/ https://neo4j.com/developer/graphql/
- Blackstone4 9y agoSeconded - Tons of GraphQL + Apollo Client tutorials out there but not much on the server. I've been using Graph.cool which does the work for me but if I have to make a server it'll be a lot harder.
- abesamiskevin 9y agoI created a boilerplate example that uses Hapi, Apollo Server, Knex (SQLite) & Webpack to give you an idea on how to get started. Apollo Server makes it easy for you understand how to write a GraphQL server by breaking it down into typeDefs and resolvers, that are needed to create your schema. https://github.com/abesamiskevin/hapi-graphql https://github.com/abesamiskevin/hapi-graphql
- aarohmankad 9y agoI used the server tutorials in howtographql.com, they were very informative. Scroll down to the hands on tutorials, the ones on the right are server-side tutorials. I still recommend you read through the beginner material as well! https://www.howtographql.com/ https://www.howtographql.com/
- yawaramin 9y agoThere's PostGraphQL, which serves a PostgreSQL database as a GraphQL schema: https://github.com/postgraphql/postgraphql https://github.com/postgraphql/postgraphql
- aargh_aargh 9y agoIs that 10 PDT or 10 PST? Trying to convert but confused...
- shurcooL 9y agoFor Go users interested in accessing GitHub's GraphQL API v4 [1], you should know that there are existing efforts [2][3] to create a Go client for it. [1] https://developer.github.com/v4/ https://developer.github.com/v4/ [2] https://github.com/google/go-github/issues/646 https://github.com/google/go-github/issues/646 [3] https://github.com/shurcooL/githubql https://github.com/shurcooL/githubql
- theogravity 9y agoI've created a really basic server + client tutorial here: https://github.com/theogravity/graphql-apollo-server-client-example https://github.com/theogravity/graphql-apollo-server-client-... I actually have stopped using Apollo on the server side (outside of the middleware) to build the GraphQL definitions. I use the vanilla graphql-js lib instead with the join-monster library for queries + batching + paging and objection.js for modeling + mutations. join-monster is built for using your database with graphql (I use postgres). Objection.js is great for mutations because of its insertGraph / upsertGraph functionality, where you can feed in your entire mutation input as a nested structure and it will perform the right insertion queries to multiple tables based on your objection.js models that you've defined. I've learned much more since then (eg authorization / authentication / mutations / implementing paging via relay connections) that I'll probably start up another project in the future talking about how to build a full-scale GraphQL server.
- ryenus 9y agoTo get started and understand how to build a GraphQL server, here's a nice video: Zero to GraphQL in 30 Minutes [0]. [0] https://www.youtube.com/watch?v=UBGzsb2UkeY https://www.youtube.com/watch?v=UBGzsb2UkeY
- schickling 9y agoHuge thanks to the GitHub team for putting together this webcast! For everybody interested who already wants to get familiar with GraphQL, check out this getting started tutorial for GraphQL: https://www.howtographql.com/ https://www.howtographql.com/
- danellis 9y agoWhat is the purpose of webcasts? Why not just post a video? I presume it's not interactive Q&A -- too many people would be watching.