Tpt added a comment. |
In T173214#4511651, @dbarratt wrote:In T173214#4457079, @Tpt wrote:For statement filtering by qualifier a good solution is maybe to add an extra parameter "hasStatement" to the statements field and give to it a value of type SnakInput (a GraphQL input type that would be used to encode a snak provided by the GraphQL client). What do you think about it?
So it looks like the proper way to do this is with a Directive. Then again, I'm not really sure I understand the difference between Directives and Arguments. Perhaps arguments can only be used on objects and Directives can be used on any type?
The value of the built-in directives @include and @skip are booleans, and, so, they are only useful in order to build generic queries that have options to enable or disable specific parts. Arguments could be complex type and are passed to the resolution code. So, it seems to me the most efficient way to filter based on qualifiers.
In T173214#4511629, @dbarratt wrote:
- Some sort of ability to specify a "fallback" language. For media, Property:P364 could be used. But perhaps more just the general ability to specify a fallback language by a property id? For instance, if a label is not available in a film, I'd prefer for it to show in it's original language (whatever that might be). I kinda wish that GraphQL had some sort of way to use values in a one query in another, but as far as I can tell you can't do that. :/
On second thought... I suppose the proper way to do this would be to first query for the "fallback" and then on the main query request the labels in both languages (the user's language and the fallback language).
Yes, it seems indeed the easiest way to do it client side. But having proper language fallback would be very nice. We could add an option to the "label", "description"... fields to use the MediaWiki language fallback system.
Cc: Smalyshev, Lydia_Pintscher, Addshore, larsgw, Saerdnaer, simon04, bearND, Siznax, Tpt, Jonas, Ricordisamoa, hoo, Lucas_Werkmeister_WMDE, Aklapper, dbarratt, PokestarFan, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, He7d3r, Jdforrester-WMF, Mbch331, Jay8g, Tgr
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs