All Projects → neomatrixcode → Diana.jl

neomatrixcode / Diana.jl

Licence: mit
GraphQL for Julia

Programming Languages

julia
2034 projects

Labels

Projects that are alternatives of or similar to Diana.jl

Android Okgraphql
Reactive GraphQl client for Android
Stars: ✭ 64 (-7.25%)
Mutual labels:  graphql
Parabol
Free online agile retrospective meeting tool
Stars: ✭ 1,145 (+1559.42%)
Mutual labels:  graphql
Graphql Microservices
Showcasing a graphql microservice setup
Stars: ✭ 68 (-1.45%)
Mutual labels:  graphql
Graphql Ld.js
Linked Data Querying with GraphQL
Stars: ✭ 65 (-5.8%)
Mutual labels:  graphql
Graphql Server
This is the core package for using GraphQL in a custom server easily
Stars: ✭ 65 (-5.8%)
Mutual labels:  graphql
Spring Examples
SpringBoot Examples
Stars: ✭ 67 (-2.9%)
Mutual labels:  graphql
Best Of Web Python
🏆 A ranked list of awesome python libraries for web development. Updated weekly.
Stars: ✭ 1,118 (+1520.29%)
Mutual labels:  graphql
Kotlin Graphql Sample
Sample implementation of Kotlin+Spring+GraphQL
Stars: ✭ 69 (+0%)
Mutual labels:  graphql
Apollo Cache Invalidation
Experimental cache invalidation tools for Apollo.
Stars: ✭ 66 (-4.35%)
Mutual labels:  graphql
Cynic
A bring your own types GraphQL client library for Rust
Stars: ✭ 68 (-1.45%)
Mutual labels:  graphql
Cynthesize Frontend
Frontend written in Angular 7 and deployed GraphQL for Cynthesize. Development build: https://cynthesize-develop.netlify.com
Stars: ✭ 65 (-5.8%)
Mutual labels:  graphql
App
Reusable framework for micro services & command line tools
Stars: ✭ 66 (-4.35%)
Mutual labels:  graphql
Ghosttheme Stockholm
👻 📝 ✨ Clean Ghost theme with advanced features & customization.
Stars: ✭ 67 (-2.9%)
Mutual labels:  graphql
Graphql4noobs
Conceitos base de GraphQL para todo tipo de desenvolvedor.
Stars: ✭ 65 (-5.8%)
Mutual labels:  graphql
Apollo Server Vercel
⚫ Production-ready Node.js GraphQL server for Vercel Serverless Functions
Stars: ✭ 69 (+0%)
Mutual labels:  graphql
Elm Hn
An Hacker News clone written in Elm.
Stars: ✭ 63 (-8.7%)
Mutual labels:  graphql
Awesome Fluent Graphql
Awesome list of fluent GraphQL clients & examples
Stars: ✭ 67 (-2.9%)
Mutual labels:  graphql
Vue Apollo Todos
Vue Apollo GraphQL mutation examples
Stars: ✭ 69 (+0%)
Mutual labels:  graphql
Hasura Actions Examples
Examples of handling custom business logic with Hasura Actions
Stars: ✭ 69 (+0%)
Mutual labels:  graphql
Graphql Typescript
Define and build GraphQL Schemas using typed classes
Stars: ✭ 67 (-2.9%)
Mutual labels:  graphql

Diana.jl

A Julia GraphQL client/server implementation.

Contributions welcomed!

This repository is an implementation of a GraphQL server, a query language for API created by Facebook. See more complete documentation at http://graphql.org/

Looking for help? Find resources from the community.

Getting Started

An overview of GraphQL in general is available in the README for the Specification for GraphQL.

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.

Installation

Pkg> add Diana
#Release
pkg> add Diana#master
#Development

Examples

Client

query = """
{
  neomatrix{
    nombre
    linkedin
  }
}
"""

r = Queryclient("https://neomatrix.herokuapp.com/graphql",query)
client = GraphQLClient("https://api.graph.cool/simple/v1/movies",auth="Bearer my-jwt-token")

query2 = """
query getMovie(\$title: String!) {
  Movie(title:\$title) {
    releaseDate
    actors {
      name
    }
  }
}
"""
r = client.Query(query2,vars=Dict("title" => "Inception"))

r.Data 
# "{\"data\":{\"Movie\":{\"releaseDate\":\"2010-08-28T20:00:00.000Z\",\"actors\":[{\"name\":\"Leonardo DiCaprio\"},{\"name\":\"Ellen Page\"},{\"name\":\"Tom Hardy\"},{\"name\":\"Joseph Gordon-Levitt\"},{\"name\":\"Marion Cotillard\"}]}}}"

Server

Here is one example for you to get started:

schema = Dict(
"query" => "Query"

,"Query"=> Dict(
    "persona"=>Dict("tipo"=>"Persona")
   ,"neomatrix"=>Dict("tipo"=>"Persona")
   )

,"Persona" => Dict(
    "edad"=>Dict("tipo"=>"Int")
   ,"nombre"=>Dict("tipo"=>"String")
  )

)


 resolvers=Dict(
    "Query"=>Dict(
        "neomatrix" => (root,args,ctx,info)->(return Dict("nombre"=>"josue","edad"=>26))
        ,"persona" => (root,args,ctx,info)->(return Dict("nombre"=>"Diana","edad"=>25))
    )
    ,"Persona"=>Dict(
      "edad" => (root,args,ctx,info)->(return root["edad"])
    )
)

my_schema = Schema(schema, resolvers)

Then Querying Diana.Schema is as simple as:

query= """
{
  neomatrix{
  	nombre
  }
}
"""
result = my_schema.execute(query)
# "{\"data\":{\"neomatrix\":{\"nombre\":\"josue\"}}}"

TODO

  • [x] Client
  • [x] Lexer
  • [x] Parser
  • [x] Query validation
  • [x] Schemas / Types
  • [x] Query execution
    • [x] Arguments
    • [x] Scalar types
    • [x] Multiple forms of resolution
    • [x] Extract variable values
    • [ ] Complex types (List, Object, etc)
    • [ ] Fragments in queries
    • [ ] Directives
  • [x] Mutation execution
  • [ ] Subscriptions execution
  • [ ] Introspection
  • [ ] Depth of the query
  • [ ] Middleware

Documentation

Documentation and links to additional resources are available at https://neomatrixcode.github.io/Diana.jl/v0.2/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].