Skip to content

Additional GraphQL fixes#13602

Merged
andreslucena merged 18 commits intofix/fix-graphql-typefrom
fix/additional-graphql-fixes
Nov 19, 2024
Merged

Additional GraphQL fixes#13602
andreslucena merged 18 commits intofix/fix-graphql-typefrom
fix/additional-graphql-fixes

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

🎩 What? Why?

This PR adds some additional GraphQL imrovements.

  1. Decouples Decidim::ParticipatoryProcessType to the engine instead of Core
  2. Fixes a bug when single private spaces could not be found by admin
  3. Fixes a bug when unpublished components could not be found via api by admin

📌 Related Issues

Link your PR to an issue

Testing

  1. Authentitate to admin
  2. Unpublish a component from a participatory space
  3. As admin interogate API to fetch the components
  4. See there is an error
  5. Make the space private, see the admin cannot interogate via API
  6. Apply patch & restart server
  7. See space is now visible
  8. See the component is visible
  9. In incognito, as not logged in user, repeat 3, 4
  10. See the space is not visible ( returns null )
  11. Make the space public, and see in api it cannot be viewed by anonymous user
{
  participatoryProcess(id: 2){
    id
    components {
      id
      name {
        translation(locale: "en")
      }
    }
  }
}

📷 Screenshots

Please add screenshots of the changes you are proposing
Description

♥️ Thank you!

@alecslupu alecslupu added graphql-api Affects the GraphQL API module: api type: fix PRs that implement a fix for a bug and removed module: api labels Nov 4, 2024
@alecslupu alecslupu force-pushed the fix/additional-graphql-fixes branch from 2dbceea to 78bd2c6 Compare November 4, 2024 21:38
@andreslucena
Copy link
Copy Markdown
Member

Is this ready for a review @alecslupu ?

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

As we're talking about the visibility of the resources, I prefer to be extra explicit in the behavior, specially as it's easy to make mistakes when copying and pasting the different examples.

I made a quick suggestion but it should be done in the rest of the examples (or an alternative solution/wording/etc that tackles this problem)

I also prefer using the term "visitor" instead of "anonymous", as that's what we use in the User Stories as this type of user (and it's better for everyone to speak the same language in Product/Development/Documentation/etc)

alecslupu and others added 3 commits November 11, 2024 17:05
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

As this will be merged in an intermediary PR, this LGTM for now, as I want to test the full behavior in that PR

@andreslucena andreslucena merged commit 0a958ff into fix/fix-graphql-type Nov 19, 2024
@andreslucena andreslucena deleted the fix/additional-graphql-fixes branch November 19, 2024 08:19
@alecslupu alecslupu added the no-backport Pull Requests that should not be backported label Nov 20, 2024
andreslucena added a commit that referenced this pull request Dec 11, 2024
* Temp commit

* Adding authorization layer

* Add more permission checks

* Running linters

* Add Commentable tests

* Fix spec

* Do not show the moderated or deleted comments

* Add conditions for comments, users and user groups

* Fixing specs

* Fix latest round of specs

* Fix organization spec

* Apply suggestions from code review

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

* Add Praticipatory space is private but transparent

* Add Praticipatory space is private but transparent for accountability

* Add Praticipatory space is private but transparent for debates

* Add Praticipatory space is private but transparent for meetings

* Add Praticipatory space is private but transparent for forms

* Add Praticipatory space is private but transparent for proposals

* Add Praticipatory space is private but transparent for sortitions

* Linting

* Fix visibility on assemblies

* Refactor

* Fix specs

* Fix specs

* Fix specs, refactor the name of specs

* Additional GraphQL fixes (#13602)

* Additional GraphQL fixes

* More fixes

* Fix spec

* Add specs

* Fix specs

* Fix permission

* Apply review recommendations

* Apply suggestions from code review

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

* Apply review recommendations

* Refactor specs

* Apply review recommendations

* Running linters

---------

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

* Refactor context to avoid codeclimate

* running lint

* Fix specs

---------

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
alecslupu added a commit that referenced this pull request Dec 11, 2024
* Temp commit

* Adding authorization layer

* Add more permission checks

* Running linters

* Add Commentable tests

* Fix spec

* Do not show the moderated or deleted comments

* Add conditions for comments, users and user groups

* Fixing specs

* Fix latest round of specs

* Fix organization spec

* Apply suggestions from code review

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

* Add Praticipatory space is private but transparent

* Add Praticipatory space is private but transparent for accountability

* Add Praticipatory space is private but transparent for debates

* Add Praticipatory space is private but transparent for meetings

* Add Praticipatory space is private but transparent for forms

* Add Praticipatory space is private but transparent for proposals

* Add Praticipatory space is private but transparent for sortitions

* Linting

* Fix visibility on assemblies

* Refactor

* Fix specs

* Fix specs

* Fix specs, refactor the name of specs

* Additional GraphQL fixes (#13602)

* Additional GraphQL fixes

* More fixes

* Fix spec

* Add specs

* Fix specs

* Fix permission

* Apply review recommendations

* Apply suggestions from code review

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

* Apply review recommendations

* Refactor specs

* Apply review recommendations

* Running linters

---------

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

* Refactor context to avoid codeclimate

* running lint

* Fix specs

---------

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
alecslupu added a commit that referenced this pull request Dec 11, 2024
* Temp commit

* Adding authorization layer

* Add more permission checks

* Running linters

* Add Commentable tests

* Fix spec

* Do not show the moderated or deleted comments

* Add conditions for comments, users and user groups

* Fixing specs

* Fix latest round of specs

* Fix organization spec

* Apply suggestions from code review

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

* Add Praticipatory space is private but transparent

* Add Praticipatory space is private but transparent for accountability

* Add Praticipatory space is private but transparent for debates

* Add Praticipatory space is private but transparent for meetings

* Add Praticipatory space is private but transparent for forms

* Add Praticipatory space is private but transparent for proposals

* Add Praticipatory space is private but transparent for sortitions

* Linting

* Fix visibility on assemblies

* Refactor

* Fix specs

* Fix specs

* Fix specs, refactor the name of specs

* Additional GraphQL fixes (#13602)

* Additional GraphQL fixes

* More fixes

* Fix spec

* Add specs

* Fix specs

* Fix permission

* Apply review recommendations

* Apply suggestions from code review

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

* Apply review recommendations

* Refactor specs

* Apply review recommendations

* Running linters

---------

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

* Refactor context to avoid codeclimate

* running lint

* Fix specs

---------

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
alecslupu added a commit that referenced this pull request Dec 13, 2024
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
fixes (#13602)
alecslupu added a commit that referenced this pull request Dec 13, 2024
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
fixes (#13602)
antopalidi pushed a commit that referenced this pull request Dec 16, 2024
* Temp commit

* Adding authorization layer

* Add more permission checks

* Running linters

* Add Commentable tests

* Fix spec

* Do not show the moderated or deleted comments

* Add conditions for comments, users and user groups

* Fixing specs

* Fix latest round of specs

* Fix organization spec

* Apply suggestions from code review

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

* Add Praticipatory space is private but transparent

* Add Praticipatory space is private but transparent for accountability

* Add Praticipatory space is private but transparent for debates

* Add Praticipatory space is private but transparent for meetings

* Add Praticipatory space is private but transparent for forms

* Add Praticipatory space is private but transparent for proposals

* Add Praticipatory space is private but transparent for sortitions

* Linting

* Fix visibility on assemblies

* Refactor

* Fix specs

* Fix specs

* Fix specs, refactor the name of specs

* Additional GraphQL fixes (#13602)

* Additional GraphQL fixes

* More fixes

* Fix spec

* Add specs

* Fix specs

* Fix permission

* Apply review recommendations

* Apply suggestions from code review

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

* Apply review recommendations

* Refactor specs

* Apply review recommendations

* Running linters

---------

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

* Refactor context to avoid codeclimate

* running lint

* Fix specs

---------

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

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants