hoo created this task.
hoo added a project: Wikibase-Lua.
Restricted Application added a subscriber: Aklapper.
Restricted Application added a project: Wikidata.

TASK DESCRIPTION
  In the Wikibase Lua api, we provide a method 
`mw.wikibase.getReferencedEntityId` 
<https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.getReferencedEntityId>
 which a user can use to for example walk up a `subclass of` chain.
  
  This can for example be used to answer a question like: Is art museum 
(Q207694) <https://www.wikidata.org/wiki/Q207694> a (possibly indirect) 
subclass of museum (Q33506) <https://www.wikidata.org/wiki/Q33506>?
  
  But for a many real-world use cases this doesn't suffice. For example if you 
want to know whether Museum of Modern Art (Q188740) 
<https://www.wikidata.org/wiki/Q188740> is a museum, you currently have three 
instance of statements to check (like `wdt:P31/wdt:P279*` in SPARQL). In order 
to do that, you could make three calls to `mw.wikibase.getReferencedEntityId` 
(which would already eat up the entire call limit, as that function can only be 
called three times on a page).
  
  In order to address this, we need to either alter 
`mw.wikibase.getReferencedEntityId` so that we can take into account all 
instance of statements from a given entity or add a new function that does 
exactly this.
  
  This task is about choosing a new call signature (either for the currently 
existing function, or for a new one).
  
  A possible way this could look like is `wikibase.getReferencedEntityId( 
fromEntityId, { rootPropertyId = 'P31', edgePropertyId = 'P279' }, toIds )`, 
but that doesn't seem very intuitive to me. Also a new function like 
`wikibase.newFunctionName( fromEntityId, rootPropertyId, edgePropertyId, toIds 
)` seems not very intuitive to use.

TASK DETAIL
  https://phabricator.wikimedia.org/T237258

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: hoo
Cc: Aklapper, Lucas_Werkmeister_WMDE, thiemowmde, Lydia_Pintscher, hoo, 
darthmon_wmde, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, 
LawExplorer, _jensen, rosalieper, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to