close
Page MenuHomePhabricator

Allow getting statements with best rank in GraphQL
Closed, ResolvedPublic5 Estimated Story Points

Description

As a user I want to be able to get only the best rank statements of an item when reading it.

Acceptance criteria:

  • A user can request to get only best statements of an item as an additional field in the query
  • The field is called 'bestStatements' and will have the same type as the 'statements' field

More information on statement ranking can be found here: https://www.wikidata.org/wiki/Help:Ranking

Event Timeline

Ifrahkhanyaree_WMDE renamed this task from Allow getting statements with a preferred rank in GraphQL to Allow getting statements with best rank in GraphQL.Jun 5 2026, 7:24 AM

Change #1301362 had a related patch set uploaded (by Mona_WMDE; author: Mona_WMDE):

[mediawiki/extensions/Wikibase@master] GQL: Allow getting statements with best rank

https://gerrit.wikimedia.org/r/1301362

Change #1301362 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] GQL: Allow getting statements with best rank

https://gerrit.wikimedia.org/r/1301362

Jakob_WMDE subscribed.

This can be verified on beta now, e.g.

{
  item(id: "Q432") {
    bestStatements(propertyId: "P253144") {
      value {
        ... on StringValue { content }
      }
    }
  }
}