-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically Update Talawa-Docs with the latest API Schema #1240
Comments
@tasneemkoushar, @anwersayeed and @evasharma12 this should be interesting to you. |
I would like to work on this issue @palisadoes. |
SpectaQL, you may try this library too. |
You may want to work on this one simultaneously |
This format looks better. @EshaanAgg try both and let us know which one you think gives a more readable output |
@palisadoes @anwersayeed They can do the same themselves, but with some caveats:
If someone with some prior experience can help me in the same, I would greatly appreciate it. |
@palisadoes |
We would be integrating Squash CI, which would orchestrate a development server with each PR, and thus we can generate the Schema using that server's link |
Can this be used with a simplified installation process for GitHub? |
I guess this can be used too. @EshaanAgg Check out this supercharge/mongodb-github-action#24 if you face any error while connecting to URL. |
@palisadoes @anshgoyalevil One prospective way of doing so may be using a docker image and exposing a development container via the same in the GitHub action. |
@EshaanAgg I think we can run |
GitHub actions allows you to create jobs in which you can make one job dependent on another. We had that before for the API workflow: Docker example: We have a limited number of minutes (2000) per month for GitHub actions. Ideally we will want to do this on the push when the PR is merged. |
@EshaanAgg @anwersayeed Which one do you think we should go with?
SpectaQLGraphQL Markdown |
I've been playing around with this. If you put the SpectaQL output in an HTML iframe the rendering of the query strings becomes a single line of text that scrolls off the page versus what we see in the black sections above. Let's stick with the Markdown solution, then we can figure out SpectaQL later. |
I also advocate for GraphQL Markdown because of its simplicity and the fact that it generates a simple markdown file. It would be much easier to configure the same into Talawa Docs than a complete HTML file! SpectaQL has a nice look and feel, but introduces overhead that I don't think so we need right now. |
@palisadoes @EshaanAgg @anshgoyalevil This one's good too:- Graphql markdown looks good too. |
I checked Magidoc. The features like Example Query, Sidebar, etc looks good. For it to work, custom scalers would need to be configured with |
I agree with @anshgoyalevil. While the look and feel of |
I just discovered this:
It automatically creates the required menu entries for each. Look at this: This looks like exactly what we need. |
… (#1247) * Add schema documentation * Add branch for testing * Fix docker action * Fix script * Remove docker * Bug fix * Move to correct workflow file * Remove docker files * Add documentation and change directory structure * Add schema export * Fix linting * Make required changes * Linting fix * Change commit message * Add docs directory * Add manual git command * Disable hooks in CI * Generate GraphQL Schema and Markdown Documentation * Better descriptions * Add docs to ESLint ignore * Upload schema.json as artifact * Sync * Fix movement * Bug fix * Syntax fix * Syntax fix * Bug fix * Add ls * Add ls * Change driectories * Add listing * Fix directory structure * Change branchname * Remove spec * Fix workflow * Generate GraphQL Schema and Markdown Documentation * Add secret authentication * Finalise tested workflow * Change token * Move get-graphql-schema to a dev dependency * Move to TALAWA_DOCS_SYNC token --------- Co-authored-by: EshaanAgg <[email protected]>
Is your feature request related to a problem? Please describe.
The API GraphQL schema is constantly changing and it is difficult to manually document it for all the developers who need to use it in the following repos:
Describe the solution you'd like
We have identified an open source project that can convert schema files, or query a GraphQL url, to generate a markdown file containing all the elements of the schema using whatever comments the developers have added to the schema definitions.
We would like to:
Describe alternatives you've considered
N/A
Approach to be followed (optional)
See above
Additional context
graphql-markdown
executable.The text was updated successfully, but these errors were encountered: