Thanks for the explanations - that sounds very sensible.

I think this could be very useful for the OpenRefine reconciliation
interface (fetching non-trivial property paths is currently quite
inefficient).

Antonin

On 02/03/2018 18:36, Thomas Pellissier Tanon wrote:
>> This looks similar to https://github.com/seansay/wikidata-graphql
> 
> Indeed.
> 
>> What are differences? I guess various choices have to be made to map the 
>> Wikibase datamodel to GraphQL, so there is room for many variations on the 
>> same theme :)
> 
> Yes, indeed. The major differences are:
> 1. tptools/graphql provides all Wikibase DataModel features without 
> simplifications (e.g. you get reference hashes, time calendars...)
> 2. tptools/graphql does not use property labels but Pids to identify 
> properties. It has the advantage of being more stable (no change introduced 
> if a property label is changed in Wikidata) and making the GraphQL schema 
> independent of which properties actually exist and what are their datatypes.
> 3. tptools/graphql is written in PHP to see if it would be possible to 
> implement a GraphQL frontend as part of the current MediaWiki codebase.
> 4. tptools/graphql provides a way to call SPARQL from GraphQL.
> 
> Cheers,
> 
> Thomas
> 
>> Le 2 mars 2018 à 19:17, Antonin Delpeuch (lists) <li...@antonin.delpeuch.eu> 
>> a écrit :
>>
>> Nice! This looks similar to
>> https://github.com/seansay/wikidata-graphql
>>
>> What are differences? I guess various choices have to be made to map the
>> Wikibase datamodel to GraphQL, so there is room for many variations on
>> the same theme :)
>>
>> Antonin
>>
>> On 02/03/2018 18:01, Thomas Pellissier Tanon wrote:
>>> Dear all,
>>>
>>> I have hacked a prototype of GraphQL endpoint on top of the Wikidata API.
>>>
>>> GraphQL is is a simple query language design for complex data retrieval 
>>> (e.g. "give me the item QXXXX and retrieve all the P20 statements with, for 
>>> their main snak value, the label in english and the sitelink to the French 
>>> Wikipedia"). Compared to SPARQL it aims less at finding pieces of data 
>>> matching different criteria than at retrieving complex representation of 
>>> known elements. Its official website with tutorials is here: 
>>> http://graphql.org/
>>>
>>> It is deployed on Toolsforge. The query editor is here: 
>>> https://tools.wmflabs.org/tptools/wdql.html and the endpoint here: 
>>> https://tools.wmflabs.org/tptools/wdql.php
>>>
>>> A first example: A query that returns for the item about "Jean-François 
>>> Champollion" (Q260) its label in English, its description in French, its 
>>> aliases in French, its sitelink to ruwiki with the English label of its 
>>> badges, and for its death place (P20) statement the main snak value id and 
>>> English label and some data about references and qualifiers.
>>> This query could be executed using the demo instance using this link: 
>>> https://tinyurl.com/y9d6caen (click on the ">" at the top of the UI to 
>>> execute the query).
>>>
>>> More details and examples are available here: 
>>> https://phabricator.wikimedia.org/T173214 (with a query that calls SPARQL 
>>> from GraphQL!).
>>> The implementation is currently slow but provides most of the basic 
>>> features required to retrieve Wikidata content. I do not have any proper 
>>> demo yet of Wikidata editing using GraphQL mutations.
>>>
>>> Feedbacks are more than welcome on the Phabricator tickets: 
>>> https://phabricator.wikimedia.org/T173214
>>>
>>> Cheers,
>>>
>>> Thomas
>>>
>>>
>>>
>>> _______________________________________________
>>> Wikidata mailing list
>>> Wikidata@lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>>
>>
>>
>> _______________________________________________
>> Wikidata mailing list
>> Wikidata@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikidata
> 
> 
> 
> _______________________________________________
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
> 


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to