Skip to content

API paths refactor#7199

Merged
mrcasals merged 36 commits intodecidim:developfrom
i-need-another-coffee:feature/add-api-structure
Jan 22, 2021
Merged

API paths refactor#7199
mrcasals merged 36 commits intodecidim:developfrom
i-need-another-coffee:feature/add-api-structure

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu commented Jan 21, 2021

🎩 What? Why?

Refactor the API paths to fix some of the zeitwerk autoloader in rails6, and fix api loading on development environment.

📌 Related Issues

Link your PR to an issue

Testing

Describe the best way to test or validate your PR.

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

Please add screenshots of the changes you're proposing
Description

♥️ Thank you!

🔎 Notes to reviewers

Attempting to fix the #7196 issue i have performed the following steps :

  1. moved TranslatedField from app/types/decidim/core/ to lib/decidim/api/types folder.
  2. got Multiple definitions for CommentableInterface. Previously found Decidim::Comments::CommentableInterface
  3. moved CommentableInterface from app/types/decidim/comments/commentable_interface.rb to lib/decidim/api/
  4. got Multiple definitions for Scope. Previously found Decidim::Core::ScopeApiType
  5. moved Scope from app/types/decidim/core/ to lib/decidim/api/types folder.
  6. got Multiple definitions for Initiative. Previously found Decidim::Initiatives::InitiativeType
  7. moved Initiative from app/types/decidim/ -> lib/decidim/api/
  8. moved Multiple definitions for User. Previously found Decidim::Core::UserType
  9. moved User from app/types/decidim/core/ to lib/decidim/api/types folder.
  10. got Field 'metrics' doesn't exist on type 'Query'
  11. moved the QueryType from app/types/decidim/api/ to lib/decidim/api/
  12. moved the MutationType from app/types/decidim/api/ to lib/decidim/api/
  13. repeated step 1 & 2 for Category , ParticipatoryProcessType, Assembly and so on ...

Bump develop to next release version
Copy link
Copy Markdown
Contributor

@mrcasals mrcasals left a comment

Choose a reason for hiding this comment

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

Super nice job, @alecslupu! Thanks! Just left a note about some commented lines that should be removed, but that's all!

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.

2 participants