Skip to content

Update API for core module#14884

Closed
alecslupu wants to merge 32 commits intodevelopfrom
feature/api/core
Closed

Update API for core module#14884
alecslupu wants to merge 32 commits intodevelopfrom
feature/api/core

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu commented Jun 19, 2025

🎩 What? Why?

This pull request significantly expands and improves the Decidim GraphQL API, especially around user, moderation, and follow/like interfaces. It introduces several new GraphQL types for moderation and gamification, enhances the user and component interfaces, and makes the API more expressive and robust for client applications.

Key changes include:

New GraphQL Types for Moderation and Gamification

  • Added BadgeScoreType, UserModerationType, ModerationType, ReportableType, and ReportableUserType to expose user badges and moderation/reporting details in the API. These types provide structured access to badge scores, moderation events, and user reports. [1] [2] [3] [4] [5] [6] [7]

User Type and Interface Enhancements

  • Extended UserType to implement FollowableInterface and TimestampsInterface, and added fields for about, badges, followers/following counts, and personal URL. Also, the badges field now returns a list of badge scores if gamification is enabled. [1] [2]
  • Updated the root user and users queries to return UserType instead of the more generic AuthorInterface. Added new root queries for moderated users and moderations.

Followable and Likeable Interface Improvements

  • Added a followers field to FollowableInterface and improved the description and consistency of fields in LikeableInterface. [1] [2]
  • Updated shared test examples to cover the new followers field.

Component and Attachment Type Improvements

  • Enhanced ComponentInterface with publication date, visibility, and timestamp fields, and improved field ordering and descriptions.
  • Improved AttachmentType and AttachmentCollectionType by adding fields for IDs, content type, file size, link, and weight, and implemented timestamps. [1] [2]

Taxonomy and Translation Improvements

  • Added children_count and taxonomizations_count fields to TaxonomyType for richer taxonomy queries.
  • Improved robustness of translation field handling in TranslatedFieldType.

Test Factory Updates

  • Added factories for badge scores and ensured that users associated with reports, follows, and moderations are confirmed users for more realistic test data. [1] [2] [3] [4] F7cdbbd3L7R7)

These changes collectively make the Decidim API more comprehensive and ready for advanced moderation, gamification, and social features.

Please describe your pull request.

📌 Related Issues

Link your PR to an issue

Testing

Check the specs, check the api & and api docs

📷 Screenshots

Please add screenshots of the changes you are proposing
Description

♥️ Thank you!

github-actions[bot]
github-actions bot previously approved these changes Jun 19, 2025
@andreslucena andreslucena added the project: 2024-api Barcelona Supercomputing Center contract label Jul 7, 2025
github-actions[bot]
github-actions bot previously approved these changes Aug 26, 2025
github-actions[bot]
github-actions bot previously approved these changes Aug 26, 2025
github-actions[bot]
github-actions bot previously approved these changes Aug 26, 2025
github-actions[bot]
github-actions bot previously approved these changes Aug 26, 2025
github-actions[bot]
github-actions bot previously approved these changes Oct 13, 2025
@andreslucena
Copy link
Copy Markdown
Member

This approach isn't working. I'm like in the 4th round of reviews and I'm still finding the same kind of errors.

Please let's just extract the changes to different PRs. We're in like more than 70 comments and I can't keep track of what I said and if it was done.

More than 1K lines changed:

image

Let's just start a new PR with spliting:

  • StaticPages
  • Moderations
  • (...)
  • User <- this can be done the last one as I understand it refers to the other changes

github-actions[bot]
github-actions bot previously approved these changes Nov 11, 2025
github-actions[bot]
github-actions bot previously approved these changes Nov 12, 2025
github-actions[bot]
github-actions bot previously approved these changes Nov 12, 2025
github-actions[bot]
github-actions bot previously approved these changes Nov 12, 2025
github-actions[bot]
github-actions bot previously approved these changes Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants