Closed MikalDr closed 4 months ago
getWhiskey(sortType: SortType, paging: Paging): [Whiskey]
paging {page, size}
This is impemented on the "grid-display" branch as infinite scrolling
@Veggissss when trying to query whiskey using paging, we get null.
line 58 in WhiskeyFetcher seems to fail. Please help 😄
10:59:37.666 [default-nioEventLoopGroup-1-11] WARN n.g.e.SimpleDataFetcherExceptionHandler - Exception while fetching data (/getWhiskeys) : null cannot be cast to non-null type kotlin.collections.Map<*, *> java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.Map<*, *> at com.ulu.fetchers.WhiskeyFetcher.getWhiskeys$lambda$5(WhiskeyFetcher.kt:58) at graphql.execution.ExecutionStrategy.invokeDataFetcher(ExecutionStrategy.java:311) at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:287) at graphql.execution.ExecutionStrategy.resolveFieldWithInfo(ExecutionStrategy.java:213) at graphql.execution.AsyncExecutionStrategy.execute(AsyncExecutionStrategy.java:55) at graphql.execution.Execution.executeOperation(Execution.java:161)
Woops, workin on it
Should be fixed now in the latest commit.
The sorting input was changed to:
getWhiskeys(
sort: {sortType: PRICE, reverse: true}
)
As stated in this PR
@Veggissss we get data now :+1: seems to work
Tested with the running DB on the server. Seems to work. Closing as it is now complete
The endpoint has been updated in regards to paging on the backend.
On the frontend we need to add a option to change page, and load new whiskey.
DoD:
Acceptance Criteria: