Page MenuHomePhabricator

📦 Batch reading items in GraphQL
Closed, ResolvedPublic5 Estimated Story Points

Description

We want to build a GraphQL field that allows users to read multiple items in a single request.
Data returned to include the same fields as when requesting data of a single item

itemsById(ids: [ItemId]!): [Item]!

Acceptance criteria:

  • Limited to 50. No special treatment of priviliged clients needed
  • it is being indicated to the client if certain items can't be retrieved e.g. because they don't exist/were deleted

Task Breakdown notes:

  • happy path (create new list type, include tests)
  • handle missing items
    • research how to indicate missing items
    • decide and implement
  • handle redirected items
    • research how to indicate redirected items
    • decide and implement
  • include complexity rule (not more than 50 items)

Event Timeline

Ifrahkhanyaree_WMDE renamed this task from Bulk reading in GraphQL to [WIP] Batch reading in GraphQL.Sep 3 2025, 9:01 AM
Ifrahkhanyaree_WMDE updated the task description. (Show Details)
Jakob_WMDE renamed this task from [WIP] Batch reading in GraphQL to [WIP] Batch reading items in GraphQL.Sep 10 2025, 11:08 AM
Jakob_WMDE updated the task description. (Show Details)
WMDE-leszek renamed this task from [WIP] Batch reading items in GraphQL to Batch reading items in GraphQL.Sep 23 2025, 8:25 AM
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek set the point value for this task to 5.

Change #1203830 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] GQL: Extract item type into a separate class

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

Change #1203830 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] GQL: Extract item type into a separate class

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

Jakob_WMDE renamed this task from Batch reading items in GraphQL to 📦 Batch reading items in GraphQL.Nov 12 2025, 12:03 PM

The patch demo is up to date now and can be used for testing the use case.

Silvan_WMDE claimed this task.