Turn your Go REST API to GraphQL using Hasura Actions

Introduction

New REST API

mutation { registerUser( email: "[email protected]" name: "Person Name" password: "mypass" ) { id } }

Codegen: Auto generate boilerplate code

$ curl http://localhost:3000/registerUser \ --data '{ "input": { "name": "Person Name", "email": "[email protected]", "password": "mypass" } }' $ {"id":"<sample value>"}

Permissions

Relationship Data

Existing REST API

{ "action": { "name": "<action-name>" }, "input": { "arg1": "<value>", "arg2": "<value>" }, "session_variables": { "x-hasura-user-id": "<session-user-id>", "x-hasura-role": "<session-user-role>" } }

Query Action

Supported Frameworks

--

--

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