Category: Graphql

Graphql

A GraphQL SDL Reference

GraphQL schemas for a service are now most often specified using what’s known as the GraphQL SDL (schema definition language), also sometimes referred to as just GraphQL schema language. It’s a language with a very simple syntax that allows to define a schema very succinctly. Once you have a gasp at the different syntax elements […]

Graphql

Building a Simple Express-based GraphQL Server Using graphql-yoga

Another great tool was recently released by the folks behind the Graphcool framework: graphql-yoga 🧘. It provides an abstraction on top of Apollo’s apollo-server-express, the Express-based version of their JavaScript GraphQL server library. With graphql-yoga it’s now easier than ever to quickly create a basic GraphQL server. Setup First, in a new directory, create a […]

Graphql

Permissions in Graphcool

We’ve had a first look at the Graphcool framework, then a look at functions with the framework, so let’s now take a look at another important topic for when it comes to creating a GraphQL backend: permissions. Graphcool’s permission system allows to have full control over nodes and fields as to who is allowed to […]

Graphql

Hook, Subscription & Resolver Functions With Graphcool

Using the Graphcool Framework, it’s really easy to create functions for validating or manipulating data, extend the base CRUD API or perform some backend logic when certain events happen. There are 3 possible function types, and each type is suited for a specific use-case: Hook functions: These are for synchronous functions that run either right […]

Graphql

Getting Started With the Graphcool Framework

Graphcool, a popular GraphQL backend as a service solution recently moved away from the pure BaaS model and into an open source model instead with the Graphcool framework. Using the Graphcool framework, it’s easier than ever to spin-up and deploy GraphQL backends on either Graphcool’s shared infrastructure, locally in a Docker container, or on something […]

Graphql

Introspection Queries With GraphQL

With GraphQL you can run introspection queries to learn about the available fields and types of a GraphQL schema. That introspection capability is also what gives GraphiQL the ability to provide documentation about the schema and autocompletion. Let’s use the Star Wars SWAPI public API endpoint to run a few introspection queries against. 🧘‍♀️ Recommended […]

Graphql

An Introduction to GraphQL Queries

Queries in GraphQL are analogous to REST’s GET and they allow to ask the server for the data we need. Contrary to REST however, we get full power to ask for exactly what we need and in the shape we need it. For this post we’ll run queries against a Star Wars public GraphQL API […]