Agabi10 added a comment.
Herald added a subscriber: PokestarFan.

At least in eswiki we would also need a way to check if an entity or a value are from a given type (or list of types). For us it would be very useful having a way to do queries like this through Lua:

  BIND(wd:Q6012487 AS ?item)
  VALUES ?class { wd:Q386724 }
  ?item wdt:P31/wdt:P279* ?class. hint:Prior hint:gearing "forward".

Which would be called with some lua function call like mw.wikibase.checkEntityType( id, { typeId1, typeId2,... }) which would return true or false depending on the response of the query. @Lydia_Pintscher, as this is already done for the constraint check API would it be possible implementing something like this for Lua too without killing the site? Having this would simplify our transition to a single infobox template.

This use case was marked as duplicate of this task and merged into it, but I think the use case we need in eswiki is simpler to implement and that it's not the same as the one in this task.



To: Agabi10
Cc: PokestarFan, Lydia_Pintscher, Agabi10, Liuxinyu970226, Paucabot, Vriullop, MisterSynergy, Pasleim, Aklapper, Jarekt, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331
Wikidata-bugs mailing list

Reply via email to