Page MenuHomePhabricator

Create and inject configuration for Special:EntityData endpoint
Closed, ResolvedPublic

Description

We need to inject the API/SpecialPage endpoint(s) that our repositories are supposed to use for reading and writing into our app.

For now, it should be enough to only create and inject configuration for the Special:EntityData reading endpoint.

Optionally: Think about whether we really want to use Special:EntityData or if we do not need to use wbgetentities any, because we also need language fallback for labels?

Patch-For-Review:

Event Timeline

Michael created this task.Jul 18 2019, 11:47 AM

I don’t think we need separate configuration for this – the client already knows the general article path of the repo:

mw.loader.using( 'mw.config.values.wbRepo', () => {
    const repoConfig = mw.config.get( 'wbRepo' );
    console.log( repoConfig.url + repoConfig.articlePath.replace( '$1', 'Special:EntityData' ) );
} );

And just for future reference, because I happened to see it at the same time, there’s also a wikibase.client.getMwApiForRepo module that we should be able to use for wbgetentities.

Oh, sounds good! Let's use that!

Lucas_Werkmeister_WMDE moved this task from To do to Doing on the Wikidata-Bridge-Sprint-2 board.

I’ll try to do the “inject” part of this now.

Change 524512 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: add interface for configuration object

https://gerrit.wikimedia.org/r/524512

Change 524513 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: add WbRepo interface for wbRepo config value

https://gerrit.wikimedia.org/r/524513

Change 524514 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: pass and initialize ServiceRepositories in ApplicationConfig

https://gerrit.wikimedia.org/r/524514

Michael moved this task from Done to Peer Review on the Wikidata-Bridge-Sprint-2 board.

Change 524512 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: add interface for configuration object

https://gerrit.wikimedia.org/r/524512

Change 524513 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: add WbRepo interface for wbRepo config value

https://gerrit.wikimedia.org/r/524513

Change 524514 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: pass Special:EntityData URL to app, initialize services

https://gerrit.wikimedia.org/r/524514

Michael removed Lucas_Werkmeister_WMDE as the assignee of this task.Jul 23 2019, 1:12 PM
Michael moved this task from Peer Review to To do on the Wikidata-Bridge-Sprint-2 board.

This still requires some cleanup regarding eslint warnings.

Michael updated the task description. (Show Details)Jul 23 2019, 1:12 PM
Matthias_Geisler_WMDE moved this task from To do to Done on the Wikidata-Bridge-Sprint-2 board.