Tpt added a comment.

@dbarratt Thank you for planning to work on Wikibase+GraphQL.

The performance problem we face seems very standard, I believe it is the N+1 problem.
The standard way to solve it is to use the DataLoader utility. The original Facebook implementation is here: https://github.com/facebook/dataloader but our PHP GraphQL library also provides an equivalent: https://webonyx.github.io/graphql-php/data-fetching/#solving-n1-problem

But indeed rewriting to JS is a good option if we do not plan to integrate the GraphQL server inside of MediaWiki. If not, the PHP library we use actually allows to use promises and does collection for us: https://webonyx.github.io/graphql-php/data-fetching/#async-php

If you start working significantly on the GraphQL endpoint we should probably move it out of tptools to a separated shared project.


TASK DETAIL
https://phabricator.wikimedia.org/T173214

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Tpt
Cc: 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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to