Skip to content
Snippets Groups Projects

feat: :cake: Implement `UpdateGroup` Resolver

Created by: Tirokk

:cake: Pull Request

Implement UpdateGroup resolver.

Issues

Todo

  • GraphQL
  • tests:
    • general
    • slugification
      • if we change the name so that an existing slug will be generated that it is made unique by *-1
    • test if resolver Group finds group by id
    • does avatar testing make sense this way in backend/src/schema/resolvers/user_management.spec.js
      • minimum: await is missing …
      • search for other appearances of avatar: Factory.build('image', or Factory.build('image' without await
      • created an issue #5256 (closed)
  • cleanup: search for Wolle

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
131 133 session.close()
132 134 }
133 135 },
136 UpdateGroup: async (_parent, params, context, _resolveInfo) => {
137 const { categoryIds } = params
138 const { id: groupId, avatar: avatarInput } = params
139 delete params.categoryIds
140 if (CONFIG.CATEGORIES_ACTIVE && categoryIds) {
  • Created by: Mogge

    What happens when categories are active but categoriesIds is undefined

  • Created by: Tirokk

    If categoriesIds are null or undefined they are not changed in any way.

    If categoriesIds are [] an error is thrown if CONFIG.CATEGORIES_ACTIVE === true. If the array is not empty the old are deleted and new are set.

    But there's no type check if it's an array. You thing it's needed?

  • Created by: Tirokk

    The type check is done by GQL … :wink:

  • Hannes Heine
  • Created by: Mogge

    Review: Changes requested

    Looks very good! Some question ...

  • Created by: Mogge

    Review: Approved

  • Merged by: Tirokk at 2022-09-06 17:51:43 UTC

  • Please register or sign in to reply
    Loading