Project-Books / books-api

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

Fix seed data to have findByAuthor return expected data #111

Closed maines-pet closed 3 years ago

maines-pet commented 3 years ago

Summary of change

Push the persistence of all the books in BooksApiApplication#populateData near the end of the function to allow book_author to be populated.

Related issue

Closes #74

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 or by creating a new Q&A discussion on GitHub

maines-pet commented 3 years ago

I'm getting error when running the test. Gist can be found here. In BookDataFetcherTest.java, seems like all the generated *GraphQLQuery classes doesn't have single parameter constructor.

image

After applying the two above, I was able to get a successful gradle build but checking the Azure pipelines fails in the SonarCloudPublish stage. Let me know if those fixes above should be put into a different PR for anyone reviewing this.

knjk04 commented 3 years ago

@maines-pet Apologies for the late reply. Thanks for working on this! I've updated the code in main to fix the issue. It seems they no longer take one parameter in the constructors. If you could merge upstream main (main in this repository, not your fork) into your branch on your fork, this error should go away. Thanks!

maines-pet commented 3 years ago

Hi @knjk04, thanks for the update. I'll drop this PR and create a new one.