Hi all,
I believe I have managed to update the prefixes, and send the steps I followed here for posterity. I am not sure if this is the most direct solution or not, but hopefully this can be done more easily via config files in future.
Both the front-end and back-end need to be updated, but since the front-end does not automatically prepend prefixes to queries sent to the back-end, it's the back-end configuration that is most essential (for front-end, it mostly affects U.I. items).
See below the sketch.
Best, Aidan
==========================================================
## Fixing prefixes from deploy/ folder
mkdir -p config/wdqs
# need to edit these files, or at least wdqs # files will likely have different but similar names
docker cp wbs-deploy-wdqs-frontend-1:/usr/share/nginx/html/js/wdqs.min.afca8458b68f319647ae.js ./config/wdqs/
docker cp wbs-deploy-wdqs-frontend-1:/usr/share/nginx/html/js/embed.wdqs.min.ce30c6c5a55c57e335ab.js ./config/wdqs/
# edit both files locally to replace all # www.wikidata.org or wikidata.org with yoursite.org, # also potentially changing http to https
# edit docker-compose.yml to bind-mound
wdqs-frontend: image: wikibase/wdqs-frontend:2 volumes: - ./config/wdqs/wdqs.min.afca8458b68f319647ae.js:/usr/share/nginx/html/js/wdqs.min.afca8458b68f319647ae.js:ro - ./config/wdqs/embed.wdqs.min.ce30c6c5a55c57e335ab.js:/usr/share/nginx/html/js/embed.wdqs.min.ce30c6c5a55c57e335ab.js:ro # rebuild and restart front-end docker compose up -d --force-recreate wdqs-frontend
# check 1: go to front-end, do a hard refresh, in menu # on left, add prefixes (the pin), see what is printed. # this should show new prefixes
# check 2: run SELECT * WHERE { BIND(wd:Q1 as ?s) } # this will likely print old prefixes because this is # how the back-end wdqs sees the prefixes; to fix ...
# get prefixes conf from back end docker cp wbs-deploy-wdqs-1:/wdqs/prefixes.conf ./config/wdqs/prefixes.conf
# edit this file to add all the new prefixes you need (many will not already appear, but this will overwrite them)
# edit docker-compose.yml to bind-mount the custom file wdqs: volumes: - ./config/wdqs/prefixes.conf:/wdqs/prefixes.conf:ro
# rebuild docker compose up -d --force-recreate wdqs
# hopefully now both front-end and back-end are configured correctly with new prefixes.
# check: run on front-end SELECT * WHERE { BIND(wd:Q1 as ?s) } # should use new prefixes
On 2026-03-06 19:11, Aidan Hogan wrote:
Thank you Dragan! I understand this applied more changes than the prefix, but it contains some useful hints on where I might have to look.
As a quick question, do you recall if changes were necessary to the back-end with Blazegraph? I am happy for now that the frond-end is configured with workable prefixes, but the back-end still interprets default Wikidata prefixes.
Best/thanks, Aidan
On 2026-03-06 02:44, Dragan Espenschied wrote:
Here's a list of annotated changes Rhizome did to the query service to customize, among other things, the prefixes:
https://github.com/rhizomedotorg/artbase-query-gui/ commit/29ce17b225a3fb9d9bcd16896778f94495fdf9c9?diff=split#diff- a9cd85f33efd6ec23d9b1a8bfc86fdc19bccde0646bdab4e1afdfff5c6c6060a <https://github.com/rhizomedotorg/artbase-query-gui/ commit/29ce17b225a3fb9d9bcd16896778f94495fdf9c9?diff=split#diff- a9cd85f33efd6ec23d9b1a8bfc86fdc19bccde0646bdab4e1afdfff5c6c6060a>
On Fri, Mar 6, 2026 at 1:47 AM Michael Lindsey via Wikibase Community User Group <wikibaseug@lists.wikimedia.org mailto:wikibaseug@lists.wikimedia.org> wrote:
Hi all, Berkeley Law is also very curious about this... Michael Lindsey
On Thu, Mar 5, 2026 at 2:05 PM Raphael Wimmer via Wikibase Community User Group <wikibaseug@lists.wikimedia.org mailto:wikibaseug@lists.wikimedia.org> wrote:
Hi Aidan, all,
On Thu, 2026-03-05 at 15:07 -0300, Aidan Hogan via Wikibase Community User Group wrote: [...] > Would appreciate it a lot if anyone can provide pointers on how to > configure the prefixes used in the WDQS front end (and back end if > necessary)?
This is a topic where I would appreciate an answer, too. For the old, pre-Wikibase-Deploy Docker images, we forked the WDQS frontend so that we could use "wd" prefixes with our instance (because that seems/seemed to be the most robust way to achieve syntax completion, etc. in the query editor).
We modified this file: https://github.com/wikimedia/wikidata-query-gui/blob/master/ wikibase/queryService/RdfNamespaces.js <https://github.com/ wikimedia/wikidata-query-gui/blob/master/wikibase/queryService/ RdfNamespaces.js>
Here's the diff: https://github.com/wikimedia/wikidata-query-gui/compare/ master...PDA-UR:wikidata-query-gui-graphIT:master#diff- f9f77fb16c8abe9c7aa0abfa9cb44e95e72a2c23e71e98d23b10c73f8aa4aeb5 <https://github.com/wikimedia/wikidata-query-gui/compare/ master...PDA-UR:wikidata-query-gui-graphIT:master#diff- f9f77fb16c8abe9c7aa0abfa9cb44e95e72a2c23e71e98d23b10c73f8aa4aeb5>
IIRC, we imitated the way, the Rhizome Artbase did it: https://github.com/rhizomedotorg/artbase-query-gui/blob/master/ wikibase/queryService/RdfNamespaces.js <https://github.com/ rhizomedotorg/artbase-query-gui/blob/master/wikibase/ queryService/RdfNamespaces.js>
(To be clear: I'm not sure if this information does apply to the most recent version, and this certainly is an ugly hack.)
If there is an easier way, I'd really appreciate a guide.
Cheers, Raphael _______________________________________________ Wikibase Community User Group mailing list -- wikibaseug@lists.wikimedia.org mailto:wikibaseug@lists.wikimedia.org To unsubscribe send an email to wikibaseug- leave@lists.wikimedia.org <mailto:wikibaseug- leave@lists.wikimedia.org>
_______________________________________________ Wikibase Community User Group mailing list -- wikibaseug@lists.wikimedia.org mailto:wikibaseug@lists.wikimedia.org To unsubscribe send an email to wikibaseug-leave@lists.wikimedia.org mailto:wikibaseug-leave@lists.wikimedia.org
--
Dragan Espenschied https://despens.digital/
Preservation https://rhizome.org/tags/preservation/ Director Rhizome http://rhizome.org at the New Museum ORCID https://orcid.org/0000-0003-1968-6172 0000-0003-1968-6172