Page MenuHomePhabricator

Create a Examples Page for WCQS
Closed, ResolvedPublic


As a user I'd like to see example usage of WCQS on WCQS examples section so I can easily start working with it.


  • Examples page on WCQS points to a specific location that exists
  • At least one query is available and usable in WCQS

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It's totally fine imo if we have no examples on that page when we release. We need to have the page, but it can be empty. The goal is to get the community involved in adding the examples, and having it empty will really illustrate the need.

Page is created and works correctly (almost, explained below). I added a single, criminally simple query - just to check the functionality.

Two things not working as they should (non blocking):

  • "Try It!" link, from the examples page always point to - even though that theoretically the parameter "endpoint" should change that. It doesn't.
  • On there are two templates for queries used: SPARQL and SPARQL2. I have no idea what the second one is for, but only the first one works for Not a problem for me, but I'm curious what is the second one for.

All in all - we should investigate the "Try It!" link, but imho we are good to go, when it comes to examples.

I think the main feature of {{SPARQL2}} (on Wikidata) is this section it adds above the query text:

The following query uses these:

Using {{SPARQL2}} over {{SPARQL}} is mainly a matter of personal preference on the part of whoever first added the example, I assume.

Also, I don’t see any mention of an “endpoint” parameter on d:Template:SPARQL nor com:Template:SPARQL. They both have a “project” parameter, which can be set to “sdc” to target instead; I guess either the template should be updated to make “sdc” target the new endpoint, or maybe a separate value “wcqs” should be introduced.

I found this documentation: Updating a template sounds like a good idea.

By the way, there is a lot of activity now at, a lot of great examples are being added.

Gehel claimed this task.