serlo / api.serlo.org

Public GraphQL API of https://serlo.org/
https://api.serlo.org/___graphql
Apache License 2.0
15 stars 4 forks source link

make resolveUuidFromDatabase also return users #1417

Closed AndreasHuber closed 5 months ago

AndreasHuber commented 6 months ago

Modify resolveUuidFromDatabase so that it cannot only return comments, but also users.

Looking at https://github.com/serlo/database-layer/tree/main/server/src/uuid may be helpful.

When done, you should be able to replace https://github.com/serlo/api.serlo.org/blob/1f4e93c85e8cd67158fb4acbe6b32aa9baf123ce/packages/server/src/schema/uuid/user/resolvers.ts#L447-L454 with await UuidResolver.removeCache({ id: userId }, context) and check if the set-description test cases still succeed.

AndreasHuber commented 6 months ago

@hugotiburtino you can check if this work would become obsolete with the user migration you have in mind.

AndreasHuber commented 6 months ago

probably good to have for #1390

hugotiburtino commented 6 months ago

@hugotiburtino you can check if this work would become obsolete with the user migration you have in mind.

Sorry for just answering now. As we discussed in a meeting, it is safer to migrate user namespace from db layer to api and only then migrate it from legacy database to kratos, since the second migration would imply a lot of changes. Doing both at the same time is an open window for really bad bugs.