dbarratt added a comment.

@Tpt so it looks like right now you can't get a datavalue or recursively call item from a statement. I added a sample query to the task description.

It's actually possible:

These examples are using the GraphQL ... on Type feature. We could maybe avoid this dispatching for DataValues if we encode in the schema the data type for each Wikidata property. But it would have the strong disadvantage to have to rebuild the GraphQL schema each time a Wikibase property is added or removed or when its datatype changes. The GraphQL schema would also be different between Wikibase instances.

OMG that is fantastic! No it makes complete sense why you did it that way, I wasn't expecting it to be like that, so it's slightly more complicated on the user, but I think the trade offs (as you described) are worse, so I think this is perfect (and now that I understand, it makes sense).

Thank you again for all your work. Is there any reason this can't be used where it is for now? (I mean ideally it would be in production somewhere).


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

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

To: dbarratt
Cc: Addshore, larsgw, Saerdnaer, simon04, bearND, Siznax, Tpt, Jonas, Ricordisamoa, hoo, Lucas_Werkmeister_WMDE, Aklapper, dbarratt, PokestarFan, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to