B-Open / jobbuzz

Brunei job search database and alert notification
https://jobbuzz.org
MIT License
1 stars 1 forks source link

add graphql endpoint #36

Closed dsychin closed 2 years ago

dsychin commented 2 years ago

Added graphql schema generator and API server endpoint. I have left the folder structure as default.

General workflow for developing with the gqlgen tool is as follow.

  1. Make changes in pkg/graph/schema.graphqls.
  2. Run make generate in repo root.
  3. It should update the pkg/graph/schema.resolvers.go file.
  4. If you deleted anything in step 1, it will probably throw an error, so go into pkg/graph/schema.resolvers.go and find the code to be deleted at the bottom, check that they are no longer required and deleted them. Then run make generate again.
  5. Edit pkg/graph/schema.resolvers.go to add the database code or business logic.
codecov-commenter commented 2 years ago

Codecov Report

Merging #36 (f7d071c) into main (03e11a9) will decrease coverage by 81.66%. The diff coverage is 14.61%.

Impacted file tree graph

@@             Coverage Diff              @@
##              main      #36       +/-   ##
============================================
- Coverage   100.00%   18.33%   -81.67%     
============================================
  Files            1        5        +4     
  Lines            9      180      +171     
============================================
+ Hits             9       33       +24     
- Misses           0      138      +138     
- Partials         0        9        +9     
Impacted Files Coverage Δ
pkg/scraper/bruneida_scraper.go 6.34% <6.34%> (ø)
pkg/controller/controller.go 42.85% <7.69%> (-57.15%) :arrow_down:
pkg/scraper/jobcenter_scraper.go 8.00% <8.16%> (ø)
pkg/scraper/scraper.go 24.24% <24.24%> (ø)
pkg/graph/schema.resolvers.go 61.53% <61.53%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7817190...f7d071c. Read the comment docs.