Posts

Showing posts from November, 2019

GraphQL, Spring Boot and MySQL Tutorial

Image
GraphQL, Spring Boot and MySQL Tutorial Introduction         When you search online for a GraphQL and Spring Boot tutorial, most of the times you end up with a tutorial which shows how to setup GraphQL freshly in a new application. Also most of the tutorials give a high level introduction and show operations on static hard-coded data. In this post I would like to show as to how you can add GraphQL functionalities to an existing Spring Boot REST API Application. In this application I am not using static data, instead I am retrieving data from MySQL database. So this tutorial gives a view of both RESTful APIs and GraphQL APIs. GraphQL         GraphQL (Graph Query Language) is basically a query language for APIs and a runtime environment which helps us to query and get results for the data in our application. It is developed by Facebook. The advantages of using GraphQL are: A GraphQL query can be used to get the exact data required instead of fetching all the fields in an ent