-
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
[Docs] Add docs for exposing GraphQL APIs #1775
Comments
Never mind 😄 , I figured it out by doing a POC today. OasGraph exposes the GraphQL schema but with the server parameter in the openapi.json it will resolve to the loopback 4 application. More over, I am going to work with an example for stitching more than one loopback4 app in the same openapi.json to see how it works 👍 |
@dhmlau , Here is my summary for this weekend. I played with OASGraph as a library and wrote this small presentation. We need to check what to add/remove etc. I see a potential way to mount the /graphql using the internal express. So, the developer can configure the option if he/she wants a graphql server , something like At this moment, I just played with the two dependencies and could manage to make a working loopback 4 application with no problems. I think the only problem at this moment is the the Delete operation not being sent the correct format to OASGraph, I will open an issue on this, aside from that I could test the relationships on the todo-list querying them and works fine. Here is a small video presentation summarizing my findings this weekend. Note that the current oasgraph CLI is only used to test an openapi.json spec file, this won't work in production, probably the best way is to use the mechanism I placed on the video, this way, I didn't have to install the oasgraph CLI or run npm link etc. |
@dhmlau do you still want to place an area in LB4 documentation about this integration? |
@marioestradarosa , yes, but I haven't given too much thought on where it should be. :) Any suggestion? |
@dhmlau , it make sense to place it in the Examples and Tutorials before/after the Deploying to IBM Cloud section. thoughts? |
sure. sounds good. |
Description / Steps to reproduce / Feature proposal
Currently user can do the following steps to create GraphQL APIs within a LoopBack app:
todo-openapi.json
./node_modules/.bin/oasgraph todo-openapi.json
Acceptance Criteria
The text was updated successfully, but these errors were encountered: