Getting Started
See original GitHub issueFor http://v4.loopback.io/getting-started-oasgraph.html some things should be changed.
As per a user comment (https://github.com/strongloop/loopback-next/issues/1762), for git clone it’s more preferable to use the https
link instead of the ssh
link.
That would be a short term thing. As per https://github.com/strongloop/v4.loopback.io/issues/43 the Developer Experience of having to link a dependency is very poor. It’s much more preferable to have the following:
npm i -g oasgraph
oasgraph ./openapi.json
and for production a user can install the dependency via package.json and build out a npm
script as follows:
start: ./node_modules/oasgraph ./openapi.json
And then be able to run npm start
Lastly the getting started page is very all over the place and not a good guide to “get started” as it currently stands as it assumes a user has an app already.
A much better Getting Started would be to say that lets build on LoopBack’s Getting Started … or add a step to clone a project from LoopBack 4 as follows:
npm i -g @loopback/cli
lb4 example todo
cd example todo // You can even point to LB Documentation for this but it's better if it's all on 1 page.
npm i oasgraph // After this is available via npm
npm start
// Visit /openapi.json and save to disk at './openapi.json' --> Maybe we can provide a script to pull it from server and save to disk?
Ctrl+C
// Add a command to package.json as follows:
> start:oasgraph: "./node_modules/oasgraph ./openapi.json"
npm run start:oasgraph
// Visit GraphQL Link
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (10 by maintainers)
Yes, Please, it is an honor. As I told Alan, I did it quickly during weekend, sorry for typos that he found etc. 😄 . I will be working on subsequent videos with loopback4 integration more carefully.
I didn’t have any experience with GraphQL before, so I did some home work this weekend and finally understood 😄 the benefits and the potential for OASGraph library.
Here is a small video presentation summarizing my findings and the way to integrate this amazing library with LoopBack 4.
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.https://www.youtube.com/watch?v=s2hScucNmaA