Turn your Ruby on Rails REST API to GraphQL using Hasura Actions
27-Aug-2020 2425
Hasura gives you instant GraphQL CRUD for databases (currently Postgres) which should cover most of the data fetching and real-time subscription use cases. However, sometimes we want to add custom business logic to our API. There are different ways of doing this with Hasura:Remote schemas: If you have an existing GraphQL server or you're comfortable writing one, you can add this GraphQL server as a Remote schema and Hasura merges it automatically.Actions: If you'd like to write a new or keep your existing REST API for custom business logic, Hasura actions are the way to go. Actions are a way to extend Hasura’s schema with custom business logic using custom queries and mutations. Actions can be added to Hasura to handle various use cases such as data validation, data enrichment from external sources and any other complex business logic.In this post, we will focus on Hasura actions and we'll see how to use them to convert a Ruby on Rails REST API to GraphQL.
Turn your Ruby on Rails REST API to GraphQL using Hasura Actions #ruby #rubydeveloper #rubyonrails #Rails #GraphQL #using #Hasura #Actions #api #rest https://rubyonrails.ba/link/turn-your-ruby-on-rails-rest-api-to-graphql-using-hasura-actions