Closed maines-pet closed 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.
Passing a second argument of empty Set
Also, #109 mentions encountering DataIntegrityViolationException in some of the test. Following the conversation in the issue, I have applied the Cascade.Remove in Author and Book model classes to avoid this exception.
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.
@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!
Hi @knjk04, thanks for the update. I'll drop this PR and create a new one.
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:
[x] Read, understood and adhered to our contributing document.
[x] Read, understood and adhered to our style guide. A lot of our code reviews are spent on ensuring compliance with our style guide, so it would save a lot of time if this was adhered to from the outset.
[x] Filled in the summary, context (if applicable) and related issue section. Replace the square brackets and its placeholder content with your contents. For an example, see any merged in pull request
[x] Created a branch that has a descriptive name (what your branch is for in a few words and includes the issue number at the end, e.g.
test-reading-goal-123
[x] Set this pull request to 'draft' if you are still working on it
[x] Resolved any merge conflicts
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