Image for post
Image for post

GraphQL mutations provide a flexible way for a client to modify data on the server. On the surface level is a very simple concept: syntactically a GraphQL mutation resembles a normal query with one small difference — top-level mutation fields are never executed in parallel. This aspect helps to ensure that all subsequent sibling mutation fields always operate on the most up-to-date version of the data.

Although you can put arbitrary logic in the mutation field resolvers, typically top-level fields are used to perform some kind of side-effect, like updating data in the database, sending an email, etc. …


Image for post
Image for post

As soon as you put your API in production, people inevitably will come to you at some point and start complaining about slow requests :) At this point it does not matter whether you are exposing REST API or GraphQL or anything else, performance is always an important concern. So starting to think about an API performance early is almost always a good idea.

GraphQL has quite a few advantages when it comes to instrumentation and performance monitoring. Due to it’s type system and fine-grained field resolution mechanism, we can instrument an execution and measure performance of every single field in the GraphQL schema. Sometimes I hear people expressing concerns about N + 1 problem in GraphQL queries which is not present in, let’s say, RESTful approach. I would disagree with this. With REST API we still have the same N + 1 problem, the difference is that with GraphQL client explicitly tells it to a server by asking for different relation fields (e.g. …


Today I am very proud to announce the release of Sangria version 1.0!

It was an amazing 1.5 year journey so far. And this is how it all started:

After initial v0.0.0 and 3 weeks of hard work the first feature-complete Scala GraphQL implementation was born:

Over the time, library evolved a lot and a lot of new and exiting features were introduced. Some of these feature go beyond reference implementation and help you to not only easily build a GraphQL server with Scala, but also ensure that your server runs smoothly in efficiently in production. Feature like:

About

Oleg Ilyenko

Passionate software engineer on his journey to perfection

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store