Quick start
Last updated
Was this helpful?
Last updated
Was this helpful?
GraphQL is a query language for API created by Facebook. See more complete documentation at . Looking for help? Find resources from the community.
An overview of GraphQL in general is available in the for the Specification for GraphQL.
Diana is a library that provides tools to implement a GraphQL API in Julia using both the code-first like (Python) approach and the schema-first like (Python). Diana produces schemas that are fully compliant with the GraphQL spec.
This package is intended to help you building GraphQL schemas/types fast and easily.
Easy to use: Diana.jl helps you use GraphQL in Julia without effort.
Data agnostic: 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.
Make queries: Diana.jl allows queries to graphql schemas.
First and install Julia. 1.5
or higher. To do the installation use any of the following commands:
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 below.
Then we can start querying our Schema by passing a GraphQL query string to execute:
Congrats! You got your first Diana schema working!