GraphQL has swiftly risen to the top as the number one tool to create API’s with. The ability for the client to dictate what data it wants to receive, as opposed to the old way, has helped usher in a new era of software development. With the ability to understand what the client is requesting, the server can now limit what data it queries for, thus improving performance. But this post is not about GraphQL. It is about the tools that have made GraphQL such a vibrant ecosystem to work within.

As tends to happen with the best ideas in open source, a vibrant ecosystem of tools have been created around GraphQL and it’s reference implementation. Apollo (founded by Meteor Development Group) is one company that has positioned itself as the go-to destination for open source tools and paid-for products in the GraphQL ecosystem.

graphql-tools is one such open source library. It came out of Apollo as an opinionated way to build out your GraphQL schemas. It allows for the separation of business logic (how you query your datastores and return that data) from your GraphQL schema definition (i.e. how your mutations, queries, custom scalars etc.. are defined in GraphQL).

At the open source team I work on, we have developed and open sourced Saturn-GQL, which builds on top of the ideas presented by Apollo’s graphql-tools . Saturn-GQL provides an opinionated, yet dead-simple interface to generate a GraphQL schema. Just pass it the top-level directory containing your GraphQL endpoints (example to follow) and get a fully fleshed out schema written in the GraphQL Schema Language on the other end. This can then, for example, be passed to the makeExecutableSchema tool in graphql-tools to be served through your HTTP server.

As I mentioned, Saturn-GQL is an opinionated way to create a GraphQL API. If you are working in a large team, or have cross-project teams, utilizing an opinionated library like Saturn-GQL can reduce total development time and can provide a smoother, more efficient on-boarding process for new (internal) teammates to a project. Let’s take a look at a quick example.