Project-Books / books-api

GraphQL Books API
https://project-books.github.io/#books-api
MIT License
35 stars 60 forks source link

Use lazy loading #25

Closed chetanchilhate closed 3 years ago

chetanchilhate commented 3 years ago

Summary of change

Lazy load authors in book and books in author

Related issue

Closes #20

Pull request checklist

Please keep this checklist in & ensure you have done the following:

For any of the optional checkboxes (e.g. the screenshots one), still check it if it does not apply.

If in doubt, get in touch with us via our Slack workspace

chetanchilhate commented 3 years ago

@knjk04 let me if any change is needed

chetanchilhate commented 3 years ago

@knjk04 added test cases have look while writing test cases, I found one issue with Book constructor we are checking not null we should also check list should not be empty if does we should throw IllegalArgumentException book must have at least one author

chetanchilhate commented 3 years ago

@knjk04 I have made suggested changes have look let me know if I missed anything I will fix it