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

2018-08-17 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...The query can can get a lot more recursive data without a lot of additional complexity ([[ https://tools.wmflabs.org/tptools/wdql.html?query=query%20getItem(%24id%3A%20ID!)%20%7B%0A%20%20item(id%3A%20%24id)%20%7B%0A%20%20%20%20label(language%3A%20%22en%22variables=%7B%0A%20%20%22id%22%3A%20%22Q6074%22%2C%0A%20%20%22lang%22%3A%20%22en%22%0A%7D&query=query%20getItem(%24id%3A%20ID!%2C%20%24lang%3A%20String!)%20%7B%0A%20%20item(id%3A%20%24id)%20%7B%0A%20%20%20%20label(language%3A%20%24lang)%20%7B%0A%20%20%20%20%20%20text%0A%20%20%20%20%7D%0A%20%20%20%20logos%3A%20statements(propertyIds%3A%20%22P154%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20images%3A%20statements(propertyIds%3A%20%22P18%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20publication%3A%20statements(propertyIds%3A%20%22P577%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20duration%3A%20statements(propertyIds%3A%20%22P2047%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20mpaa%3A%20statements(propertyIds%3A%20%22P1657%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20genres%3A%20statements(propertyIds%3A%20%22P136%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%0Afragment%20StatementItemValue%20on%20Statement%20%7B20%20director%3A%20statements(propertyIds%3A%20%22P57%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20screenwriter%3A%20statements(propertyIds%3A%20%22P58%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20cast%3A%20statements(propertyIds%3A%20%22P161%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20director%3A%20property(id%3A%20%22P57%22)%20%7B%0A%20%20%20%20...ProperyLabel%0A%20%20%7D%0A%20%20screenwriter%3A%20property(id%3A%20%22P58%22)%20%7B%0A%20%20%20%20...ProperyLabel%0A%20%20%7D%0A%7D%0A%0Afragment%20ProperyLabel%20on%20Property%20%7B%0A%20%20label(language%3A%20%24lang)%20%7B%0A%20%20%20%20text%0A%20%20%7D%0A%7D%0A%0Afragment%20StatementItemValue%20on%20Statement%20%7B%0A%20%20order%3A%20qualifiers(propertyIds%3A%20%22P1545%22)%20%7B%0A%20%20%20%20...%20on%20PropertyValueSnak%20%7B%0A%20%20%20%20%20%20item%3A%20value%20%7B%0A%20%20%20%20%20%20%20%20...%20on%20StringValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%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%20%20data%3A%20mainsnak%20%7B%0A%20%20%20%20...%20on%20PropertyValueSnak%20%7B%0A%20%20%20%20%20%20item%3A%20value%20%7B%0A%20%20%20%20%20%20%20%20...%20on%20StringValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20...%20on%20QuantityValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%3A%20amount%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20...%20on%20TimeValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%3A%20time%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20...%20on%20StringValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20...%20on%20Item%20%7B%0A%20%20%20%20%20%20%20%20%20%20label(language%3A%20%22en%22)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20text%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&operationName=getItem&variables=%7B%0A%20%20%22id%22%3A%20%22Q817266%22%0A%7DItem%20%7B%0A%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20label(language%3A%20%24lang)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20text%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 ]])TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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


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

2018-07-28 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...It would be really helpful if you could request data about a single item (or multiple by id) and get back a subset of nested itemsTASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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


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

2018-07-26 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...images: statements(propertyIds: "P18") {
  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": {
"text": "LGBT-related film"
  }
}
  }
}
  ]
}
  }
}
```

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. images: statements(propertyIds: "P18", best: true) {
  ...StatementItemValue
}
genres: statements(propertyIds: "P136", best: true) {
  ...StatementItemValue
}
  }
}

fragment StatementItemValue on Statement {
  data: mainsnak {
... on PropertyValueSnak {
  item: value {
... on StringValue {
  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": {
"text": "LGBT-related film"
  }
}
  }
}
  ]
}
  }
}
```
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. 

The query can can get a lot more recursive data without a lot of additional complexity ([[ https://tools.wmflabs.org/tptools/wdql.html?query=query%20getItem(%24id%3A%20ID!)%20%7B%0A%20%20item(id%3A%20%24id)%20%7B%0A%20%20%20%20label(language%3A%20%22en%22)%20%7B%0A%20%20%20%20%20%20text%0A%20%20%20%20%7D%0A%20%20%20%20logos%3A%20statements(propertyIds%3A%20%22P154%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20images%3A%20statements(propertyIds%3A%20%22P18%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20publication%3A%20statements(propertyIds%3A%20%22P577%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20duration%3A%20statements(propertyIds%3A%20%22P2047%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20mpaa%3A%20statements(propertyIds%3A%20%22P1657%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%20%20genres%3A%20statements(propertyIds%3A%20%22P136%22%2C%20best%3A%20true)%20%7B%0A%20%20%20%20%20%20...StatementItemValue%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%0Afragment%20StatementItemValue%20on%20Statement%20%7B%0A%20%20data%3A%20mainsnak%20%7B%0A%20%20%20%20...%20on%20PropertyValueSnak%20%7B%0A%20%20%20%20%20%20item%3A%20value%20%7B%0A%20%20%20%20%20%20%20%20...%20on%20StringValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20...%20on%20QuantityValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%3A%20amount%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20...%20on%20TimeValue%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%3A%20time%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%

[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] [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] [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] [Edited] T173214: Support GraphQL Queries

2018-07-20 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...
I'm not sure this would return anything at all if the title is missing in English. And this is just three properties, it will get even more complicated with more properties. Also, it would be extremely difficult to get nested properties. For instance, if I wanted to get each genre's `P136` image `P19` I wouldn't be able to do that (at least not well) without a subsiquent query. And adding another item id to the query would make it even more complex (etc. etc.)...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-20 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTION...or to query for properties with SPARQL on a single item, is a little complicated:...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-20 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTIONI think it would be really helpful if Wikidata supported [[ http://graphql.org | GraphQL ]] ([[ http://facebook.github.io/graphql/ | spec ]]) which is used not only by Facebook, but is also now the exclusive method for [[ https://developer.github.com/v4/ |GitHub's API ]]. 

It seems that developers are becoming more accustomed to GraphQL and I think it would be helpful if we added support for it.**Problem**
Getting data for a single item either gives you a huge (~47KB) response:
https://www.wikidata.org/wiki/Special:EntityData/Q817266.json
This response also doesn't telll you what the ids represent. For instance there is no way to know what a `P136` id represents without making another set of requests with //huge// responses.

or to query for properties on a single item, is a little complicated:
```
SELECT ?title (sample(?image) as ?singleImage)  (group_concat(?genreLabel; separator="; ") as ?genres) WHERE {
	wd:Q817266 rdfs:label ?title filter (lang(?title) = "en") .
	optional { wd:Q817266 wdt:P18 ?image . }
	optional { wd:Q817266 wdt:P136 ?genre . }
	service wikibase:label { bd:serviceParam wikibase:language "en". ?genre rdfs:label ?genreLabel. }
} group by ?title

I'm not sure this would return anything at all if the title is missing in English. And this is just three properties, it will get even more complicated with more properties. Also, it would be extremely difficult to get nested properties. For instance, if I wanted to get each genre's `P136` image `P19` I wouldn't be able to do that (at least not well) without a subsiquent query. And adding another item id to the query would make it even more complex (etc. etc.)

SPARQL is fantastic at doing what it does: making complex queries and getting a list of items back. But it's not very good at getting a bunch of nested properties on a single item.

It would be really helpful if you could request data about a single item (or multiple by id) and get back a subset of nested .

**Solution**
I think it would be really helpful if Wikidata supported [[ http://graphql.org | GraphQL ]] ([[ http://facebook.github.io/graphql/ | spec ]]) which is used not only by Facebook, but is also now the exclusive method for [[ https://developer.github.com/v4/ |GitHub's API ]]. 

The above SPARQL query could look like this (based on the work done in T173214#3865779):
```
{
  item(id: "Q817266") {
label(language: "en") {
  text
}
images: statements(propertyIds: "P18") {
  image: mainsnak {
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"
}
  }
}
  ]
}
  }
}
```

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. TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: 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

2017-08-12 Thread dbarratt
dbarratt updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTIONI think it would be really helpful if Wikidata supported [[ GraphQL | http://graphql.org/ }} ([[ spec | | GraphQL ]] ([[ http://facebook.github.io/graphql/ | spec ]]) which is used not only by Facebook, but is also now the exclusive method for [[ GitHub's API | https://developer.github.com/v4/ |GitHub's API ]]. ...TASK DETAILhttps://phabricator.wikimedia.org/T173214EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dbarrattCc: Aklapper, dbarratt, PokestarFan, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs