Home / Companies / Hasura / Blog / Post Details
Content Deep Dive

Turn your Java REST API to GraphQL using Hasura Actions

Blog post from Hasura

Post Details
Company
Date Published
Author
Vishwa Mehta
Word Count
1,539
Language
English
Hacker News Points
-
Summary

This post discusses how to use Hasura Actions to convert Java REST APIs to GraphQL. It explains that writing a GraphQL server from scratch involves setting up the schema, type definitions, and resolvers. However, Hasura reduces this complexity by providing instant GraphQL CRUD for databases like Postgres, covering most data-fetching and real-time subscription use-cases. The post then explores how to define types and configure endpoints using Actions in Hasura Console. It demonstrates the process of creating a new Hasura Cloud project, defining Action and Type definitions, generating boilerplate code for Java server setup, setting up Spring Boot, exposing the server on a public URL, and finally testing the GraphQL API with a mutation. The post also covers permissions, relationship data, existing REST APIs, query actions, and supported frameworks.