GraphQL is a data query language for APIs and a runtime for fulfilling those queries with your existing data developed by Facebook in 2012 and launched on the internet in 2015. It is an alternative to REST and ad-hoc web service architectures.
Diana is a library that allows you to build a GraphQL API in Julia, its main objective is to provide an API that is easy and simple to use, but expandable to facilitate the work of developers.
Diana.jl helps you use GraphQL in Julia without effort.
Diana.jl supports any type of data source: SQL, NoSQL, etc. The intent is to provide a complete API and make your data available through GraphQL.
Diana.jl allows queries to graphql schemas.
Let’s build a basic GraphQL schema to say “hello” and “goodbye” in Diana. For each Field in our Schema, we write a Resolver method to fetch data requested by a client’s Query using the current context and Arguments.
In the GraphQL Schema Definition Language, we could describe the fields defined by our example code as show.