August 8, 2022

Blog @ Munaf Sheikh

Latest news from tech-feeds around the world.

Hello, ArtemisQL. Visualize your relational database and… | by Artemis QL | Dec, 2021

An open-source GraphQL migration tool – providing SQL database visualization and schema prototyping – to ease the transition from REST to GraphQL

ArtemisQL is a GraphQL prototyping tool and SQL database visualizer built for developers looking to optimize their queries and transition away from RESTful APIs |
ArtemisQL is a GraphQL prototyping tool and SQL database visualizer built for developers looking to optimize their queries and transition away from RESTful APIs |

REST (Representational State Transfer) has become the de-facto standard for designing web APIs. However, with the rise of mobile applications, there have emerged several downsides to using it, such as over-fetching and under-fetching, among others.

Using REST requires a three separate requests to three different endpoints in order to fetch the required data. The result? Over-fetching, since the endpoints return extra, unneeded information. (

In 2015, developers at Facebook created GraphQL as a solution to some of the shortcomings of REST. GraphQL is a database query language that is declarative, hierarchical, and strongly-typed. To avoid over and under-fetching, GraphQL structures its queries on the client-side, declaring all of the data it wants to query or mutate, through its type definitions, so there are set expectations between client and server. The response follows the structure outlined in the request, so there are no surprise errors for client or server. The client only requests the data it needs, and the server returns only that data from the database.

Here is the same request, this time made using GraphQL. Using a single query, the client specifies both the structure and the content of the server’s response. (

My colleagues and I at OS Labs are strong proponents of GraphQL and believe it will continue to gain traction as an alternative to REST moving forward, however, we realize that transitioning away from REST can be cumbersome and intimidating, so we began working on a solution…

We developed ArtemisQL, an open-source, free-to-use developer tool, that serves multiple purposes. Essentially it connects to your PostgreSQL database and offers key insights into your database architecture, through an aesthetic, intuitive graphical interface, harnessing React Flow nodes, edges, and handles, to display your tables, columns, and relationships. Secondly, it generates real-time GraphQL schema (type definitions, queries, mutations) based on your data, as well as resolvers, with custom SQL queries, that can be exported to be seamlessly integrated into your own application. And lastly, it connects to a graphiql sandbox, where you can explore all of the CRUD (create, read, update, and delete) possibilities of GraphQL through querying and mutating your own database.

Head over to and click on “Get Started” button. Input the URI link to your own database or, if you don’t have one, use our sample Star Wars database we’ve provided to demo our GUI.

  • Input your PostgreSQL URI
  • OR use the sample database to view data rendered in an interactive diagram

Interact with our intuitive GUI displaying all of your database tables and columns. Familiarize yourself with the relationships between tables, which is easier to understand when visualized in React Flow. Primary and foreign keys are depicted by node handles, and each connection depicted in node edges. Drag and drop nodes to rearrange your database and better understand how each table relates to another.

  • View the relationships between the tables in the database that are connected by primary and foreign keys.
  • Drag and drop tables tables to intuitively understand the structure of the database and the relationships between the tables.

Scroll through our schema tab on the right side of the dashboard. You’ll find unique GraphQL type definitions, queries, mutations, and resolvers, all generated from your database. Our “Copy” feature allows you to save the schemas and resolvers in the clipboard so you can insert it into your application without having to convert the data or write any code yourself.

  • Look through GraphQL schema, where you can find type definitions and resolvers.
  • Click on the copy button to save the code and insert it into your own project.

If you’d like to test your GraphQL queries and mutations, head to the top left corner and click on the “Sandbox” button, which will take you to our interactive playground where you can start exploring all of the possibilities of GraphQL using your newly generated schema as reference.

  • Craft queries and mutations in our interactive GraphiQL Sandbox, using our provided sample database.

Our main goal with this product is to encourage developers to explore GraphQL and guarantee the transition from REST APIs to GraphQL is as easy and pain-free as possible.

Source link