[Wikidata-bugs] [Maniphest] [Updated] T102533: [Bug] Disallow (or resolve) dummy language codes.

2018-07-21 Thread Liuxinyu970226
Liuxinyu970226 added a comment.
@Nikki I would love to know how to request a new BCP47 language tag?
@jeblad P7379 List of macrolanguage codesTASK DETAILhttps://phabricator.wikimedia.org/T102533EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Liuxinyu970226Cc: Amire80, jeblad, Pasleim, Multichill, PokestarFan, Quest_for_Truth, Liuxinyu970226, Nikki, Fomafix, Mbch331, Ricordisamoa, Danmichaelo, Aklapper, daniel, Lahi, Gq86, Baloch007, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, Srdjan_m, MuhammadShuaib, LNDDYL, Psychoslave, Wikidata-bugs, aude, Gryllida, Shizhao, Arrbee, KartikMistry, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T96040: Wikibase special pages (tracking)

2018-07-21 Thread KTC
KTC added a subtask: T200130: Wikibase-rc-wikibase-edit-title rendering.
TASK DETAILhttps://phabricator.wikimedia.org/T96040EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: KTCCc: PokestarFan, Luke081515, Liuxinyu970226, aude, Aklapper, Lahi, Gq86, Lsherwinforone, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, Sethakill, Wong128hk, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T200130: Wikibase-rc-wikibase-edit-title rendering

2018-07-21 Thread KTC
KTC added a parent task: T96040: Wikibase special pages (tracking).
TASK DETAILhttps://phabricator.wikimedia.org/T200130EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: KTCCc: KTC, Aklapper, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, Srdjan_m, MuhammadShuaib, LNDDYL, Psychoslave, Wikidata-bugs, aude, Gryllida, Shizhao, Arrbee, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Created] T200130: Wikibase-rc-wikibase-edit-title rendering

2018-07-21 Thread KTC
KTC created this task.KTC added projects: Wikidata, MediaWiki-extensions-WikibaseClient, I18n.Herald added a subscriber: Aklapper.
TASK DESCRIPTION(Coming at this from English Wikipedia.)

The special flags that are shown on watchlist and recent changes (r, N, m, b, !, D) are rendered with tooltips, and with a legend box. For the other flags, the tooltips are rendered with source message (e.g.), whereas the legend box shows the local MediaWiki message (e.g.).

In the case of Wikidata however, both the legend box and the tooltips are rendered from the local message, and not from source.

Previously it contained a wikilink, which was removed per T98703. Now the tooltips is rendering html codes. So we have

Edit made at Wikidata

Is there any way of fixing this so the legend box still has the markups, but not when the message is showed as a tooltips?TASK DETAILhttps://phabricator.wikimedia.org/T200130EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: KTCCc: KTC, Aklapper, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, Srdjan_m, MuhammadShuaib, LNDDYL, Psychoslave, Wikidata-bugs, aude, Gryllida, Shizhao, Arrbee, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt added a revision: D1082: CORS Preflight causes a PHP Fatal Error.
TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: Addshore, larsgw, Saerdnaer, simon04, bearND, Siznax, Tpt, Jonas, Ricordisamoa, hoo, Lucas_Werkmeister_WMDE, Aklapper, dbarratt, PokestarFan, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Xmlizer, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Raised Priority] T146750: Wiki(pedi)a RSS user manual updates & IFTTT Flask application UI improvements (on Toolforge)

2018-07-21 Thread D3r1ck01
D3r1ck01 raised the priority of this task from "Low" to "Normal".D3r1ck01 removed a project: Africa-Wikimedia-Developers.D3r1ck01 updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...[] Transfer docs from PDF to Wiki (including the pictures/snapshots) - Note that the new UI should be used in the snapshots, here is the link: https://www.mediawiki.org/wiki/Help:Wikipedia_RSS_Feed_User_Manual - (Interested persons can now follow here for updates and changes on how the doc is advancing)TASK DETAILhttps://phabricator.wikimedia.org/T146750EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: D3r1ck01Cc: Yaron_Koren, Tinaj1234, Slaporte, Aklapper, Lydia_Pintscher, hoo, 01tonythomas, Bene, D3r1ck01, AndyTan, Zylc, Cpaulf30, 1978Gage2001, Lahi, Gq86, GoranSMilovanovic, Ivana_Isadora, Jayprakash12345, Chicocvenancio, QZanden, Tbscho, LawExplorer, JJMC89, srodlund, Wikidata-bugs, aude, Dinoguy1000, Gryllida, scfc, Mbch331, Jay8g, Krenair, chasemp, Anyijonathan, Tamgue, Mahveotm, BamLifa, Noella94, JamieTubers, EddyAfful, Eugene233, Zppix, rosalieper, Flixtey, Jdlrobson___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Triaged] T199409: [Bug] NewLexeme suggester menu appears behind special page tab

2018-07-21 Thread Greta_Doci_WMDE
Greta_Doci_WMDE triaged this task as "Normal" priority.
TASK DETAILhttps://phabricator.wikimedia.org/T199409EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Greta_Doci_WMDECc: Greta_Doci_WMDE, Lydia_Pintscher, Lea_Lacroix_WMDE, Lexicographical data, KaMan, Mringgaard, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Darkdadaah, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T199916: query.wikidata.org returning different results when re-running a query, though the data is unchanged

2018-07-21 Thread Greta_Doci_WMDE
Greta_Doci_WMDE added a comment.
I re-run the query and first time it shows 1531, the second time 1534. I ran it couple of times after that and the result didn't change. Even when I changed the browser. I guess, yes, its a de-sync problem and its not fixed yet.TASK DETAILhttps://phabricator.wikimedia.org/T199916EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Smalyshev, Greta_Doci_WMDECc: Greta_Doci_WMDE, Smalyshev, mhl20, Aklapper, Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Jonas, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Edited] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...This makes the query a whole lot small and easier to do and [[ https://github.com/graphql/graphiql | GraphiQL ]] also supports introspection as seen in T173214#3865779 so the whole thing is self-documenting. 

**Implementation**
This could either exist as a new query service ([[ https://graphql.wikidata.org/ | graphql.wikidata.org ]] ?) or it could exist as a new extension, or it could be a part of wikibase repository.TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: Addshore, larsgw, Saerdnaer, simon04, bearND, Siznax, Tpt, Jonas, Ricordisamoa, hoo, Lucas_Werkmeister_WMDE, Aklapper, dbarratt, PokestarFan, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Xmlizer, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt edited projects, added MediaWiki-extensions-WikibaseRepository; removed wikibase-registry.
TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: Addshore, larsgw, Saerdnaer, simon04, bearND, Siznax, Tpt, Jonas, Ricordisamoa, hoo, Lucas_Werkmeister_WMDE, Aklapper, dbarratt, PokestarFan, Lahi, Gq86, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Xmlizer, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331, LJ, SandraF_WMF, Andrawaag, Daniel_Mietchen, Lydia_Pintscher___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt added projects: Wikidata.org, Wikidata-Query-Service, wikibase-registry.
TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: Addshore, larsgw, Saerdnaer, simon04, bearND, Siznax, Tpt, Jonas, Ricordisamoa, hoo, Lucas_Werkmeister_WMDE, Aklapper, dbarratt, PokestarFan, LJ, Lahi, Gq86, SandraF_WMF, Andrawaag, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Xmlizer, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Daniel_Mietchen, Manybubbles, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Created] T200123: Duplication error fires off in unwanted scenario

2018-07-21 Thread Giku
Giku created this task.Giku added a project: Wikidata.Herald added a subscriber: Aklapper.
TASK DESCRIPTIONThe duplication error, that makes sure combinations of label and description are unique per language, fires off in an unwanted scenario.

Please follow the use case:


I am working with two items about rivers with the same name (Luncșoara): https://www.wikidata.org/w/index.php?title=Q6704038=712569951 and https://www.wikidata.org/w/index.php?title=Q4685855=708385509
I need to fix the title of Q6704038 (ş->ș) and also disambiguate the items by setting detailed description. Note that the initial description for both is the same: 'river in Romania'
I go to Q4685855, I leave the label as 'Luncșoara River' and set description to 'river in Romania, tributary of Hălmăgel', I save and it works fine.
I go to Q6704038, I set the label to 'Luncșoara River' and set description to 'river in Romania, tributary of Valea Mare'


OBSERVED:
On step 4, when I try to publish/save, I get the following error:

Could not save due to an error.

Item Q4685855 already has label "Luncșoara River" associated with language code en, using the same description text.

Please note that the error is erroneous, as item Q4685855 had been set with a distinct description before I altered Q6704038.

My workaround is purging Q6704038 and trying again.

Please consider reproducing using the following items: Q6711603 and Q13580581, where the latter is to be used for step 3 and the former for step 4.TASK DETAILhttps://phabricator.wikimedia.org/T200123EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: GikuCc: johl, Giku, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt added a revision: D1081: Add CORS Header.
TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt added a comment.
@Tpt Here's a patch to enable CORS on the graphql endpoint. :) D1081TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Triaged] T200075: Wikidata mobile website: Make coordinates clickable

2018-07-21 Thread Greta_Doci_WMDE
Greta_Doci_WMDE triaged this task as "Lowest" priority.
TASK DETAILhttps://phabricator.wikimedia.org/T200075EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Greta_Doci_WMDECc: Nicolas_Raoul, Aklapper, Lahi, Gq86, mojoaxel, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt added a comment.
I suppose if you were given the ability to access the values by property OR by base type (like you can now) it leaves the decision to tie requests to a specific instance of wikibase, or to make it more abstracted (and be able to be used with any instance). Leaving that up to the user I think is a good idea. :)TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T187424: Support queued SPARQL request

2018-07-21 Thread Addshore
Addshore added a comment.
Something like https://github.com/dbcls/sparql-proxy could be possible (not actually tested it out)TASK DETAILhttps://phabricator.wikimedia.org/T187424EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AddshoreCc: Addshore, Smalyshev, abian, Lucas_Werkmeister_WMDE, Aklapper, Bugreporter, Lahi, Gq86, Darkminds3113, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Avner, Gehel, Jonas, FloNight, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt added a comment.

In T173214#4442721, @Tpt wrote:
It could definitely be used now but without any stability guaranties. The GraphQL query resolution is a bit heavy because it makes a lot of requests to the API but for light usages it should be definitely possible to use it. I am still not happy with everything, especially the data values access that is indeed not very user friendly.


Yeah there might be some opportunities to simplify/flatten the access a bit. I'm not sure how this could be done other than making the properties themselves types? Though there might be way too many properties to do that, and as you mentioned, it would have to be rebuilt every time a property changes. Although, I kinda doubt that the type of a property changes very often (if at all?), so they could be cached for a long time and it could be done within an extension or within wikibase itself dynamically. I don't think it's a big deal that it would be different for every wikibase instance, the API (Special:EntityData & SPARQL) is already different for each instance of wikibase, so as long as the introspection works correctly, I think it's fine (or even preferred) if it doesn't try to be the same across instances.TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T173214: Support GraphQL Queries

2018-07-21 Thread Tpt
Tpt added a comment.
Thank you!

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

It could definitely be used now but without any stability guaranties. The GraphQL query resolution is a bit heavy because it makes a lot of requests to the API but for light usages it should be definitely possible to use it. I am still not happy with everything, especially the data values access that is indeed not very user friendly.TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: TptCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Edited] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...  image: mainsnak {
... on PropertyValueSnak {
  value {
... on StringValue {
  filename: value
}
  }
}
  }
}
genres: statements(propertyIds: "P136") {
  genre: mainsnak {
... on PropertyValueSnak {
  value {
... on Item {
  label(language: "en") {
text
  }
}
  }
}
  }
}
  }
}
```

which would give a repsonse like this:
```
lang=json
{
  "data": {
"item": {
  "label": {
"text": "Easy A"
  },
  "images": [
{
  "image": {
"value": {
  "filename": "Easy A.svg"
}
  }
}
  ],
  "genres": [
{
  "genre": {
"value": {
  "label": {
"text": "comedy film"
  }
}
  }
},
{
  "genre": {
"value": {
  "label": {
"text": "teen film"
  }
}
  }
},
{
  "genre": {
"value": {data: mainsnak {
... on PropertyValueSnak {
  item: value {
... on StringValue {
  value
}
  }
}
  }
}
genres: statements(propertyIds: "P136") {
  data: mainsnak {
... on PropertyValueSnak {
  item: value {
... on Item {
  label(language: "en") {
text
  }
}
  }
}
  }
}
  }
}
```

which would give a repsonse like this:
```
lang=json
{
  "data": {
"item": {
  "label": {
"text": "Easy A"
  },
  "images": [
{
  "data": {
"item": {
  "value": "Easy A.svg"
}
  }
}
  ],
  "genres": [
{
  "data": {
"item": {
  "label": {
"text": "comedy film"
  }
}
  }
},
{
  "data": {
"item": {
  "label": {
"text": "teen film"
  }
}
  }
},
{
  "data": {
"item": {
  "label": {...TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt added a comment.

In T173214#4442684, @Tpt wrote:
@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 DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Edited] T173214: Support GraphQL Queries

2018-07-21 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...value: datavalue
  }
}
genres: statements(propertyIds: "P136") {
  item {
label(language: "en") {
  text
}
  }
}
  }
}
```

which would give a repsonse like this:
```
lang=json
{
  "data": {
"item": {
  "label": {
"text": "Easy A"
  },
  "images": [
{
  "image": {
"value": "Easy A.svg"
  }
}
  ],
  "genres": [
{
  "genre": {
"label": {
  "text": "comedy film"
}
  }
},
{
  "genre": {
"label": {
  "text": "teen film"
}
  }
},
{
  "genre": {
"label": {
  "text": "LGBT-related film"... on PropertyValueSnak {
  value {
... on StringValue {
  filename: value
}
  }
}
  }
}
genres: statements(propertyIds: "P136") {
  genre: mainsnak {
... on PropertyValueSnak {
  value {
... on Item {
  label(language: "en") {
text
  }
}
  }
}
  }
}
  }
}
```

which would give a repsonse like this:
```
lang=json
{
  "data": {
"item": {
  "label": {
"text": "Easy A"
  },
  "images": [
{
  "image": {
"value": {
  "filename": "Easy A.svg"
}
  }
}
  ],
  "genres": [
{
  "genre": {
"value": {
  "label": {
"text": "comedy film"
  }
}
  }
},
{
  "genre": {
"value": {
  "label": {
"text": "teen film"
  }
}
  }
},
{
  "genre": {
"value": {
  "label": {
"text": "LGBT-related film"
  }
}...TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T173214: Support GraphQL Queries

2018-07-21 Thread Tpt
Tpt 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:

Example with the string data type: https://tools.wmflabs.org/tptools/wdql.html?query=%7B%0A%20%20champollion%3A%20item(id%3A%20%22Q260%22)%20%7B%0A%20%20%20%20statements(propertyIds%3A%20%22P214%22)%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20rank%0A%20%20%20%20%20%20mainsnak%20%7B%0A%20%20%20%20%20%20%20%20...%20on%20PropertyValueSnak%20%7B%0A%20%20%20%20%20%20%20%20%20%20property%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20%20%20datatype%0A%20%20%20%20%20%20%20%20%20%20%20%20label%3A%20label(language%3A%20%22en%22)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20text%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20value%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%0A%20%20%20%20%20%20%20%20%20%20%20%20...%20on%20StringValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20value%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A

Example with items: https://tools.wmflabs.org/tptools/wdql.html?query=%7B%0A%20%20champollion%3A%20item(id%3A%20%22Q260%22)%20%7B%0A%20%20%20%20statements(propertyIds%3A%20%22P31%22)%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20rank%0A%20%20%20%20%20%20mainsnak%20%7B%0A%20%20%20%20%20%20%20%20...%20on%20PropertyValueSnak%20%7B%0A%20%20%20%20%20%20%20%20%20%20property%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20%20%20datatype%0A%20%20%20%20%20%20%20%20%20%20%20%20label%3A%20label(language%3A%20%22en%22)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20text%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20value%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%0A%20%20%20%20%20%20%20%20%20%20%20%20...%20on%20Item%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20label%3A%20label(language%3A%20%22en%22)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20text%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20references%20%7B%0A%20%20%20%20%20%20%20%20hash%0A%20%20%20%20%20%20%20%20snaks(propertyIds%3A%20%5B%22P143%22%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%0A%20%20%20%20%20%20%20%20%20%20...%20on%20PropertyValueSnak%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20value%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20...%20on%20Entity%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A

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.TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: TptCc: 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
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs