Giter VIP home page Giter VIP logo

graphqlviz's Introduction

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.

graphqlviz's People

Contributors

macroz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.