• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    Clojure
  • License
    Eclipse Public Li...
  • Created about 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GraphQLviz marries GraphQL (schemas) with Graphviz.

GraphQLviz Build Status

GraphQLviz marries GraphQL (schemas) with Graphviz.

It's a tool to show you what your schema really looks like. At the moment, it's mostly useful as a complement to GraphiQL, like printing a huge poster size version to facilitate team discussions.

Quick Usage

Requires Graphviz and Java Virtual Machine.

There is a convenient uberjar release available to download from the release page.

Once you have Graphviz, Java and the uberjar, then you can use GraphQLviz like a regular Java app like so:

java -jar graphqlviz.jar https://api.digitransit.fi/routing/v1/routers/finland/index/graphql digitransit

Example schema (from Digitransit)

Example graph

Run java -jar graphqlviz.jar --help for more options or read the Full Usage.

Full Usage

You must have Graphviz executable from command-line. Download and install it using your package manager or go to Graphviz.

You also need Leiningen. Leiningen is the Clojure build tool that runs on the Java Virtual Machine. This means you also need Java.

If you like to use Leiningen, you can run like this:

lein run https://api.digitransit.fi/routing/v1/routers/finland/index/graphql digitransit

There is a prepackaged jar in Clojars so you don't have to build GraphQLviz yourself.

Also there is a convenient uberjar release available to download from the release page.

With these JAR files you can run like this:

java -jar graphqlviz.jar https://api.digitransit.fi/routing/v1/routers/finland/index/graphql digitransit

If you want to use the code from Clojure, perhaps from your own program, add to your project.clj:

Clojars Project

Separate introspection

Instead of running against a live GraphQL server, you can use a downloaded result of an introspection query like this:

java -jar graphqlviz.jar examples/digitransit.json digitransit

Otherwise, in the case of a URL, the introspection query is executed against the GraphQL endpoint and the results visualized.

Authentication

Since 0.4.0, you can pass options for authenticating with the server for the introspection query (-a or --auth).

The supported authentication types are basic, digest (with user and password) as well as oauth2 (with oauth token) See also -h for help.

java -jar graphqlviz.jar http://secret.example.com/graphql secret-schema-name -abasic -utester -ppassword

Or with password prompt -pp or --password-prompt (since 0.5.0).

java -jar graphqlviz.jar http://secret.example.com/graphql secret-schema-name -abasic -utester --password-prompt

Backlog

  • Use dynamic graph features as in archi
  • Develop a complete JavaScript solution of the same idea

License

Copyright © 2015-2017 Markku Rontu

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

More Repositories

1

tangle

Tangle - the Clojure library that visualizes your tangle of data with Graphviz.
Clojure
58
star
2

archi

Draw (architecture) diagrams as easily as Archi.
Clojure
11
star
3

kerbal

Play Kerbal Space Program from Clojure with the help of KRPC.
Clojure
9
star
4

archi-example

Example project for archi also useful as a quickstart template.
HTML
3
star
5

cljs-front-end-demos

ClojureScript front-end demos
Clojure
3
star
6

finaljourney

Final Journey, a minimalist game for Ludum Dare #26
JavaScript
3
star
7

stars

Demoscene - Three.js - Stars
JavaScript
3
star
8

graphql-client

Hiccup-like syntax for GraphQL in Clojure(Script).
Clojure
3
star
9

raspispy

iBeacon spy Raspberry Pi, ClojureScript on Node.js
Clojure
3
star
10

chains

Demoscene - Three.js - Winter Light Chains
JavaScript
3
star
11

onewayticket

One-way Ticket To Space Train, Ludum Dare #23 game programming competition entry by @zorcam
JavaScript
2
star
12

mandelbrot

Demoscene - Three.js - Mandelbrot
JavaScript
2
star
13

crt

Clojure Refactoring Tool
Clojure
2
star
14

grayrunner

Gray runner is a side-scrolling runner game like Canabalt made with ClojureScript
JavaScript
2
star
15

search

This is a Clojure library for search algorithms.
Clojure
2
star
16

spheres

Demoscene - Three.js - Winter Light Spheres
JavaScript
2
star
17

sustainability

A Clojure library designed to help you live sustainably.
Clojure
2
star
18

snow

Demoscene - Three.js - Snow
JavaScript
2
star
19

next-departures

Example ClojureScript project that uses Digitransit API
Clojure
2
star
20

train-table

VR R-Train Table Prototype
Clojure
2
star
21

gtfs

GTFS utilities
Protocol Buffer
2
star
22

coarse

Use Rough.js to make SVGs look hand-drawn
JavaScript
2
star
23

clojurescript-train-radiator

A small example project in ClojureScript. Fetches train information from rata.digitraffic.fi API and displays it.
Clojure
2
star
24

flag

Demoscene - Three.js - Flag
JavaScript
2
star
25

loxone-simple-js

Simple Loxone control with JavaScript
JavaScript
2
star
26

reactocular

Visual brutish component scan of React projects
Clojure
2
star
27

three

Testing three.js, for example glTF model loading
JavaScript
1
star
28

one

The .one. is a game for Ludum Dare 28 game programming competition by Markku Rontu.
JavaScript
1
star
29

brute

Plot It Simple Stupid
Clojure
1
star
30

locutus

The collective knows where you are.
Clojure
1
star
31

tamperoid

Asteroids clone for the browser made with ClojureScript
JavaScript
1
star
32

ngt-base

ngt-base is repository with a basic working nGinTonic game
JavaScript
1
star
33

adventureengine

Parallax scrolling engine for adventure games made with ClojureScript
Clojure
1
star
34

json-stereotype

Extract stereotypical data from any JSON blob.
Clojure
1
star
35

dotfiles

My important settings files, especially for Emacs
Emacs Lisp
1
star
36

viba

Can you feel the beat?
Clojure
1
star
37

lumo

lumo enables you to create captivating audiovisual experiences
Clojure
1
star
38

valo

Let there be light
Clojure
1
star
39

production-simulation

Production simulation test
Clojure
1
star
40

ngt

nGinTonic (ngt) is a Entity-Component-System game engine.
JavaScript
1
star
41

galaxy

Demoscene - Three.js - Random Galaxy
JavaScript
1
star
42

whalesong

Whalesong is a WebSocket client for testing.
Clojure
1
star