twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Refactor graphql query runner and add mutation resolvers

Open Weiko opened this issue 4 months ago • 1 comments

Fixes https://github.com/twentyhq/twenty/issues/6859

This PR adds all the remaining resolvers for

  • updateOne/updateMany
  • createOne/createMany
  • deleteOne/deleteMany
  • destroyOne
  • restoreMany

Also

  • refactored the graphql-query-runner to be able to add other resolvers without too much boilerplate.
  • add missing events that were not sent anymore as well as webhooks
  • make resolver injectable so they can inject other services as well
  • use objectMetadataMap from cache instead of computing it multiple time
  • various fixes (mutation not correctly parsing JSON, relationHelper fetching data with empty ids set, ...)

Next steps:

  • Wrapping query builder to handle DB events properly
  • Move webhook emitters to db event listener
  • Add pagination where it's missing (findDuplicates, nested relations, etc...)

Weiko avatar Oct 03 '24 15:10 Weiko