Metadecidim
Sign in

Process

Co-creating the roadmap 2025–2027

not yet on protocol

Extend the GraphQL mutations APIs

Is your feature request related to a problem? Please describe.
Currently the Decidim GraphQL API allows mostly fetching records from the API, i.e. read-only. The only mutation/write API that we have today is for creating comments because the comments section used to work as a separate React application that utilized this API.

The write APIs (i.e. GraphQL mutations) are missing for most records although they would be highly useful for many integration purposes.

Describe the solution you'd like
I would like to have the following mutation APIs available for the different records within Decidim:

  • Proposals
  • Answer a proposal / update the answer for a proposal
  • Budgets
  • CRUD budget
  • CRUD project
  • Accountability
  • CRUD result
  • CRUD timeline entry

In addition, we also need API credential management and login/logout endpoints for the APIs that work programmatically.

Describe alternatives you've considered
Creating a one-off mutations that serve a specific purpose (e.g. one of the operations listed above) but this is not very maintainable or scalable way to develop the platform further. We would see these APIs to be beneficial also for the core.

Additional context
We have a project in progress where we actually need these APIs, so this is just to communicate to the product team that we will be working on creating these APIs.

We will initially create these APIs in a separate module because we need them already for the current 0.27 version but we would like to integrate these eventually also to the core.

Does this issue could impact on users private data?
No

Funded by
We have a customer who is funding the project

3 comments

  1. In favour

    This is something that we have talked in the DecidimFest23 in the developers group.

    When we talked about this feature in a Product Team meeting the use case that we had in mind is for a mobile native application. So, we were thinking on implementing user facing actions (proposal creation, votes on proposals, meetings registration, budget votings, etc). For the models that you're talking about, I understand your use case is for administrators/valuators using an external application, is that right?

    Just to be clear, I'm not against that use-case, but just to understand better the need.

    0 votes up 0 votes down
  2. Very much in favour of this - we are super interested in it and if you need any financial or development or testing support for it, on the OSP side we will try our best to find the ressources for it!

    0 votes up 0 votes down
  3. The initial implementation is here btw
    https://github.com/City-of-Turku/decidim-module-apiext

    For what I've seen, it includes an interface in /system to create users that will be authenticated via key/secrets and then generating tokens for authentication. So the user performing changes (mutations) is not any of the regular users of the organization (is just another type, like the user_groups).

    The readme states that is capable of:

    👉️ Proposals
    Answer proposal
    👉️ Budgets
    Create budget
    Update budget
    Delete budget
    Create project
    Update project
    Delete project

    👉️ Accountability
    Create result
    Update result
    Delete result
    Create timeline entry
    Update timeline entry
    Delete timeline entry

    0 votes up 0 votes down

Sign in with your Atmosphere account to comment.