GraphQL Editor LogoTry GraphQL Editor

GraphQL tools & libraries

August 28, 2020 by Michal

If you’re interested in a writeup about GraphQL itself head on over here. In this piece, we’ll take a look at some of the many handy GraphQL tools that make using it even more worthwhile. Bear in mind there’s quite a few of them so we’re not going to get through the lot of them in one go.

Prisma

As mentioned before, working with GraphQL will require you to set up a database. Well, there’s also BaaS so you can outsource it, but what if you don’t want to? This is where Prisma comes in, it’s a clever middle ground between doing it yourself and outsourcing. Prisma is an ORM library that lets you interact with the database from the server in the language you choose. So if you want to write to your MySQL database you don’t have to do it in SQL, Prima lets you do it in Python, JavaScript or some other language you prefer.

You might think: “Yeah, but that’s just what a regular ORM library does”. True, but Prisma comes with a few added functions:

  • database agnostic: Prisma currently supports MySQL, PostgreSQL, MariaDB, SQLite, and AWS Aurora, with more to come soon,
  • supports TypeScript, JavaScript, Flow, and Go,
  • provides premade basic CRUD queries.

Prisma GraphQL

Source: prisma.io

Relay

Relay is a JavaScript framework created by Facebook for fetching and managing GraphQL data. Relay is supposed to be the go-to tool for GraphQL users with a focus on validating and optimizing your code. Another focal point is being a bridge between GraphQL and React. Relay lets you set up your data requirements using GraphQL and then it will handle the fetching, collecting queries into network requests to get you exactly what you wanted.

Relay is composed of three main loosely coupled modules:

  • Relay Compiler: a GraphQL compiler that analyzes, validates, and optimizes GraphQL in your code.
  • Relay Runtime: a full-featured GraphQL runtime for building higher level client APIs
  • Relay/React: a product API that integrates Relay Runtime with React

Relay GraphQL

Source: relay.dev

Apollo

The APOLLO platform is an implementation of GraphQL that transfers data from the server to your UI. Apollo-client is a comprehensive state management library for JavaScript that lets you manage both local and remote data with GraphQL. The aim is to enable you to build UI components that fetch data via GraphQL. Apollo-server is a quick way for building an API for GraphQL using data from any source by using a spec-compliant server that can be queried from any GraphQL client, including the Apollo-client.

Let’s look at the Apollo-client features:

  • a declarative approach to data fetching, all the logic for retrieving data, tracking, loading and uploading it to the UI is contained in a single query,
  • designed for modern React, the Apollo client takes advantage of the latest React features such as hooks,
  • adaptable, can be dropped into any JavaScript app seamlessly,
  • universally compatible, can be used with any GraphQL API.

Apollo GraphQL

Source: apollographql.com

Hasura

Hasura is a GraphQL engine that boasts its high speed and performance. It gives you instant realtime GraphQL APIs on any Postgres database, with remote schemas for business logic and webhook triggers on database events.

The focus is to help quickly build GraphQL apps backed by Postgres or use Postgres to help move existing apps to GraphQLs:

  • realtime, convert GraphQL queries to live queries via subscriptions,
  • fast and instantly ready to use, simply point it to a Postgres database and instantly get a GraphQL API,
  • powerful queries, Hasura has built-in filtering, pagination, pattern search, bulk insert, update, delete mutations,
  • fairly new and in rapid development with a bunch of features coming soon.

Hasura GraphQL

Source: hasura.io

URQL

urql is a versatile and highly adaptable GraphQL client by Formidable labs. It uses React hooks and components and intends to be a lighter client than the others. A versatile tool that you can customize to fit your needs and fine-tune as you get further along working with GraphQL.

The aim is hitting a middle ground, keeping it somewhat simple while also being able to handle complex assignments by:

  • performance and functionality, significantly lighter than other clients,
  • customization, the client provides a few default Exchanges, easily customizable code that handles interactions with the API, app or framework,
  • instantly ready to use, urql is basically ready for work right off the bat and does not require extensive configuration like some other clients,
  • named after an iconic sitcom character.

URQL GraphQL

Source: formidable.com/urql/

Well, that’s it for the first look at GraphQL tools. Remember that that’s only five of them and GraphQL has plenty of other tools to choose from. So if I missed your favorite, just mention it in the comments and stay tuned for the next parts!


Speed up your GraphQL API development

The GraphQL Editor is a supportive tool for both advanced GraphQL users as well as those taking their first steps with GraphQL APIs. Our all-in-one development environment for GraphQL will help you build, manage & deploy your GraphQL API much faster thanks to dozens of built-in micro features. Its graphical interface will also fix communication within your product team. Visualization is the key!

Try it for free

Michał Tyszkiewicz
Written by Michał Tyszkiewicz GraphQL enthusiast & LA Lakers hardcore fan email me:[email protected]
← Back to blog

Menu

© Copyright 2018 Graphqleditor.com