Replace graphql-docs npm package with gem #8631
Replace graphql-docs npm package with gem #8631andreslucena merged 16 commits intodecidim:developfrom
Conversation
9b099e4 to
e172bd7
Compare
c5fb725 to
b5c32ad
Compare
425a23f to
36c5304
Compare
de8e74c to
55f415a
Compare
|
On this kind of PRs, where we supersede work done by others and using that as the base, I prefer to have the original commits cherry-picked (or even directly using the original branch as a starter). This is important for respecting the authorship of the original developer. Is there any other step to be done for seeing this? Locally, after creating the development_app, I see this: I don't see any js nor rails exception |
55f415a to
441701f
Compare
@andreslucena, That particular PR has 22 commits, and i found it hard to cherry-pick the required commits. On the other hand, in order to test this, you will need to run the following commands (after you refetch): additionally, you may want to remove the following: |
441701f to
3cb460c
Compare
b09bba0 to
f7c3252
Compare
|
Ready to be merged for me, great job 👏🏽 👏🏽 Please change the branch to |
@andreslucena , i have added f721f0d that makes the repository switch back to Decidim Core. |
andreslucena
left a comment
There was a problem hiding this comment.
A minor change (the last one, I promise 😄)
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
@andreslucena Fixed. Feel free to merge anytime :) |
|
Seems like the CI error in Generators is relevant @alecslupu:
Can you check it? |
The generator errors is caused by the fact that specs cannot find the task in the develop branch. Check f721f0d that makes the repository switch back to Decidim Core, and that is actually breaks the generators specs. |
That makes perfect sense 😅 |


🎩 What? Why?
Some NPM packages used by the project are very old. This could affect the project maintenaince and security, as it's not possible to update packages with recent versions. This PR tries to improve that.
These are the main issues found:
graphql-docsnpm package is very old and it's not maintained. I've tried to update it but it requires too much work to do it. I've found a gem also calledgraphql-docsthat generates a very similar output but statically. I've created a rake task that uses it and generates those static files in theapp/views/static/folder. Then, I've embeded those files into the docs view, to get a result very similar to the existing solution. The task can be run manually, but it will be run after the creation of the app and after each decidim upgrade. The only "problem" is that this static files should be added to the app repository, and that's a bit ugly.Most of the work has been done by @leio10 in #8335
📌 Related Issues
Link your PR to an issue
Related to Update old JS dependencies #8335
Related to Fix deprecation on graphql_definition ( Upgrade Graphql to 1.12.x) brettchalupa/graphql-docs#89
Related to Legacy
.graphql_definitionobjects are deprecated and will be removed in GraphQL-Ruby 2.0. Remove.graphql_definitionto use a class-based definition instead. brettchalupa/graphql-docs#88📷 Screenshots
Please add screenshots of the changes you're proposing

