Skip to content
Github mirror of "wikidata/query/gui" - our actual code is hosted with Gerrit (please see for contributing)
Branch: master
Clone or download
Pull request Compare This branch is 259 commits ahead of nyurik:master.
nyurik Added taginfo usage stats status
Change-Id: I7f7cbf98b579ace3ae1eb99c947bd5fe495b72f6
Latest commit 3a36142 Dec 19, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Update dist js file and provide JSFiddles Dec 22, 2016
i18n Localisation updates from Nov 22, 2018
wikibase Added taginfo usage stats status Dec 20, 2018
.gitignore update ignore to include logs Jan 26, 2018
.gitreview Add .gitreview Feb 18, 2016
.jscsrc Enable JSCS rule to enforce newlines in var blocks Jan 23, 2017
.jshintignore Polestar support Oct 21, 2016
.jshintrc Allow specifying options for non-default views Nov 13, 2017
.stylelintrc Disable no-descending-specificity stylelint rule Jan 16, 2018
Dockerfile fix dockerfile build Nov 26, 2018
Gruntfile.js Merge remote-tracking branch 'origin/master' Nov 23, 2018
LICENSE merged with master Nov 18, 2018
copyright.html merged with master Nov 18, 2018
embed.html merged with master Nov 18, 2018
favicon.ico Change favicon to "magnifying glass" image Sep 25, 2017
github.svg all-changes-collapsed Jan 2, 2018
index.html Added taginfo usage stats status Dec 20, 2018
land.html all-changes-collapsed Jan 2, 2018
logo-embed.svg all-changes-collapsed Jan 2, 2018
logo.svg all-changes-collapsed Jan 2, 2018
maint.html T105080: maintenance mode page Jul 30, 2015
package.json merged with master Nov 18, 2018
pom.xml Set proper node/npm versions Mar 8, 2018
robots.txt Whitespace fix-ups Aug 10, 2016
style.less merged with master Nov 18, 2018
templates.mustache all-changes-collapsed Jan 2, 2018
throbbler.gif all-changes-collapsed Jan 2, 2018

Wikibase Query Service GUI

This repository contains the GUI for the OSM Sophox Service.

Download & setup

Clone git repo, go into created folder and then pull all dependencies via npm package manager.

$ git clone
$ cd gui
$ npm install

Alternatively, use npm install.

npm install wikidata-query-gui

Run tests

Run JSHint, JSCS and QUnit tests.

$ npm test


Start a test server for local debugging. Do not use it in production.

$ npm start


Create a build with bundled and minified files.

$ npm run build


Create a build and push it to the deployment branch via git review.

$ npm run deploy

Please make sure you have defined a gitreview username:

git config --global --add gitreview.username "[username]"



A CodeMirror based SPARQL editor with code completion (ctrl+space) and tooltips (hover).

var editor = new wikibase.queryService.ui.editor.Editor();
editor.fromTextArea( $( '.editor' )[0] );

See examples/editor.html.

Example dialog

A dialog that allows browsing of SPARQL examples.

new wikibase.queryService.ui.dialog.QueryExampleDialog(  $element, querySamplesApi, callback, previewUrl );

See examples/dialog.html.


var api = new wikibase.queryService.api.Sparql();
api.query( query ).done( function() {
	var json = JSON.parse( api.getResultAsJson() );

} );

See examples/sparql.html.

Result Views

Views that allow rendering SPARQL results (see documentation).

var api = new wikibase.queryService.api.Sparql();
api.query( query ).done(function() {
	var result = new wikibase.queryService.ui.resultBrowser.CoordinateResultBrowser();
	result.setResult( api.getResultRawData() );
	result.draw( element );
} );

See examples/result.html.

Release Notes and npm package

Unfortunately there are no releases and the provided code and interfaces are not considered to be stable. Also the dist/ folder contains a build that may not reflect the current code on master branch.

You can’t perform that action at this time.