I was scratching my head for weeks trying to figure out why my Absinthe GraphQL API mutations weren’t resolving the right output. It turns out that it was an easy fix.

⁉️ The problem

Right now I’m building a GraphQL API for a project using Elixir’s Absinthe library. I’m using the Kronky library to help resolve useful error messages when a mutation fails.

All of the queries worked as expected, but the mutations always returned the same error, even when the mutation succeeds (!).

This is what it returned when I call the updatePost mutation:

Image for post
Image for post

Here’s what that error looks like:

{
"data": {
"updatePost": null
},
"errors": [
{
"locations": [
{
"column": 0,
"line": 7
}
],
"message": "Cannot return null for non-nullable field",
"path": [
"updatePost",
"successful"
]
}
]…


⚠️ This is the second article in a 2-part series
→️ Click here if you missed Part 1 :)

Elixir is a wonderful language. Expressive, productive, scalable, fault-tolerant… it’s pretty darn cool. But how do we manage projects which use different versions?

Enter asdf.

🤔 What have we done so far?

In part 1, we got quite a lot done:

  1. Installed asdf version manager
  2. Installed the Erlang & Elixir plugins for asdf:
  3. Installed Erlang 19.3 and Elixir 1.3.4 using asdf
  4. Set asdf to use Erlang 19.3 and Elixir 1.3.4 globally (using the global keyword)
  5. Created a new project using Elixir 1.3.4
  6. Told asdf to always use Elixir 1.3.4 and Erlang 19.3 for our new project (using the local


Image for post
Image for post

Elixir is a wonderful language. Expressive, productive, scalable, fault-tolerant… it’s pretty darn cool. But how do we manage projects which use different versions?

Want to get started as fast as possible? Do you only need the latest version of Elixir? Then Elixir’s official installation guide is the best place to start :)

For everyone else — if you want to easily switch between different versions of Elixir (and Erlang) for different projects: keep on reading below.

What do you do if one project needs Elixir 1.7 while another needs Elixir 1.3 …


When installing VirtualBox on Mac High Sierra, the ‘Installation Failed’ error can be quite stubborn. Let’s fix that.

Introduction

A colleague had some trouble installing VirtualBox on macOS High Sierra v10.13.5. Here’s the error he kept encountering:

Image for post
Image for post

We scoured the web for solutions before finally figuring it out.

Finding a solution wasn’t as easy as we’d hoped, so hopefully our findings below will help out anyone who ran into the same stubborn error that we did.

Check this first

  1. Open up System Preferences
  2. Click on theSecurity & Privacy icon
  3. Make sure Allow apps downloaded from: App store and identified developers is checked.

It should look like this:

About

Daniel Meechan

I find problems, create solutions, and then teach what I’ve learnt |> Full Stack Software Engineer |> DevOps |> Brazillian Jiu Jitsu

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