Skip to content

Update decidim-accountability GraphQL API#14326

Merged
andreslucena merged 10 commits intofeature/api-improvementfrom
feature/api/accountability
Mar 20, 2025
Merged

Update decidim-accountability GraphQL API#14326
andreslucena merged 10 commits intofeature/api-improvementfrom
feature/api/accountability

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu commented Mar 17, 2025

🎩 What? Why?

This PR we review the accountability module, to which :

  • Add new interfaces
  • Refactor specs to use new interface tests
  • Improve the specs on types
  • Add missing field
  • Remove obsolete fields

📌 Related Issues

Link your PR to an issue

Testing

Describe the best way to test or validate your PR.

📷 Screenshots

Please add screenshots of the changes you are proposing
image

♥️ Thank you!

@alecslupu alecslupu force-pushed the feature/api/accountability branch 2 times, most recently from 04f1b74 to 56bf0e7 Compare March 17, 2025 16:41
@alecslupu alecslupu force-pushed the feature/api/accountability branch from 56bf0e7 to 04502a1 Compare March 17, 2025 17:00
@alecslupu alecslupu changed the title Update of the API GraphQL Update decidim-accountability GraphQL API Mar 17, 2025
@alecslupu alecslupu added the project: 2024-api Barcelona Supercomputing Center contract label Mar 17, 2025
@alecslupu alecslupu mentioned this pull request Mar 17, 2025
26 tasks
@alecslupu alecslupu requested a review from andreslucena March 18, 2025 20:44
@alecslupu alecslupu marked this pull request as ready for review March 18, 2025 20:44
field :parent, Decidim::Accountability::ResultType, "The parent result", null: true
field :progress, GraphQL::Types::Float, "The progress for this result", null: true
field :reference, GraphQL::Types::String, "The reference for this result", null: true
field :proposal_urls, [String, { null: true }], "The proposal URLs for this result", null: true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On this case we could just return the ProposalType, right? I think it'd be more idiomatic, as if we just return the URL, then the consumers of the API need to make another query for getting the metadata of the Proposals by getting the ID/component/process/etc.

Does that makes sense?

@alecslupu alecslupu requested a review from andreslucena March 20, 2025 05:37
progress
reference
startDate
address
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please follow alphabetical order 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 99efe17

@alecslupu alecslupu requested a review from andreslucena March 20, 2025 10:34
@andreslucena andreslucena merged commit 4072480 into feature/api-improvement Mar 20, 2025
43 checks passed
@andreslucena andreslucena deleted the feature/api/accountability branch March 20, 2025 12:07
andreslucena added a commit that referenced this pull request Mar 28, 2025
* Update of the API GraphQL

* Refactor api

* Running linters

* Update decidim-core/lib/decidim/api/interfaces/attachable_collection_interface.rb

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>

* Update `decidim-blogs` GraphQL API (#14327)

* Update `decidim-blogs` GraphQL API

* Add url to list

* Update `decidim-debates` GraphQL API (#14331)

* Update `decidim-debates` GraphQL API

* Refactor specs

* Add more fields

* Update `decidim-budgets` GraphQL API (#14328)

* Update `decidim-budgets` GraphQL API

* Add more fields

* Apply suggestions from code review

* Add budget integration specs

* Update decidim-budgets/spec/types/project_type_spec.rb

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>

* Sort alphabetically

---------

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>

* Update `decidim-accountability` GraphQL API (#14326)

* Change Api for Accountability module

* Fix spec

* Add url field

* Add proposal urls field

* Add integration_spec for results

* Sort alphabetically

* More

* More sorting

* Update `decidim-conferences` GraphQL API (#14330)

* Update `decidim-conferences` GraphQL API

* Running linters

* Add more fields

* Fix usage

* Add url spec

* Implement conference schema spec

* Sort alphabetically

* Add resource fields to integration schema specs (#14358)

* Add post fields to integration_schema spec

* Add debate fields to integration_schema spec

* Sort alphabetically

* Sort alphabetically

* Update `decidim-assemblies` GraphQL API (#14329)

* Update `decidim-assemblies` GraphQL API

* Fixing specs

* Add url to assemblies

* Fix spec

* Add integration specs

* Sort alphabetically

---------

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

graphql-api Affects the GraphQL API module: accountability project: 2024-api Barcelona Supercomputing Center contract

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants