GithubHelp home page GithubHelp logo

zeginis / graphql-qb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swirrl/cubiql

0.0 1.0 0.0 438 KB

Experimental graphql service for querying multidimensional Linked Data Cubes

Home Page: http://graphql-qb.publishmydata.com/

License: Eclipse Public License 1.0

Clojure 100.00%

graphql-qb's Introduction

CubiQL

Build Status

CubiQL (formerly called graphql-qb) is a proof of concept GraphQL service for querying Linked Data Cubes that was produced as part of the Open Gov Intelligence project.

The primary aim of graphql-qb is to facilitate the querying of multidimensional QB datasets through GraphQL in an easier more familiar way than through SPARQL.

Example

We have hosted an example graphql-qb service at graphql-qb.publishmydata.com which is currently using data from from statistics.gov.scot.

The graphql endpoint for this service can be found at: http://graphql-qb.publishmydata.com/graphql

Example Queries

Pagination

As CubiQL provides access to datacubes and slices containing potentially large amounts of observations, observations are paginated following the graphql recommendation. Paginating through the data might not however suit all consumers, and might even timeout on larger datasets. So we anticipate providing a download_link field into the observations schema #43.

You can see an example of a pagination query here. You'll notice that this query has been parameterised by a $page parameter, which is provided in the supplied variable map. So to get the next page of results you just need to supply a new map of variables with page bound to the last value of the next_page field.

Using graphql voyager

You can browse our schema by following these steps:

  1. Run the graphql voyager introspection query on our endpoint
  2. Copy the result of the above query to your clipboard
  3. Visit https://apis.guru/graphql-voyager/
  4. Select custom schema
  5. Paste the schema into the text area
  6. Click change schema.

You'll see something like: screen shot 2017-09-08 at 15 48 29

Running yourself

$ java -jar graphql-qb-0.1.0-standalone.jar OPTIONS

The available options are:

Name Default
port 8080
endpoint

For example to run the server against a remote SPARQL endpoint on port 9000:

$ java -jar graphql-qb-standalone.jar --port 9000 --endpoint http://remote-endpoint/sparql/query

If the endpoint is not specified the built-in test data will be used.

The server hosts a GraphQL endpoint at http://localhost:PORT/graphql which follows the protocol described here.

License

Copyright © 2017 Swirrl IT Ltd.

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

graphql-qb's People

Contributors

lkitching avatar zeginis avatar rickmoynihan avatar ricswirrl 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.