3 ms·
I've created a really basic server + client tutorial here: https://github.com/theogravity/graphql-apollo-server-client-example https://github.com/theogravity/g
by theogravity 9y ago
I'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.