Skip to content

convert a bunch of dbutil.DB to database.DB

Administrator requested to merge cc/use-database-db-in-resolvers into main

Created by: camdencheek

Now that all the stores have mockable interface versions, we can start using them. I've already begun the process in order to nail down the pattern, but in order to allow mocking across the entire codebase, we need to replace usage of dbutil.DB with database.DB so mocks can be propagated.

Progresses #26113

This commit just updates one of our graphql resolvers to use database.DB instead of dbutil.DB, then fixes the type errors. Pretty amazing how interconnected it all is.

This is a very mechanical change. The process was just:

  1. Update a resolver to use database.DB instead of dbutil.DB
  2. Fix any type errors by changing the input type to database.DB, or if there is no input type, wrap the object with database.NewDB()
  3. Repeat 2

There will be more like this, but given that these changes hit a huge portion of the code base, keeping them smaller will hopefully help with merge conflicts.

Merge request reports

Loading