Skip to content

Add support for Window scrolling queries #1605

Open
@chrisbuettgen

Description

@chrisbuettgen

Hi there,
originally I was working with Spring for GraphQL when I stumbled upon this problem:

I wanted to perform a query with a Reactive Repository returning a windowed result, but it would complain about a "non unique result". Most likely because the return type of the Repsitory method is Mono<Window<Book>> (I need the Window for GraphQL), but the query itself returns several rows.

interface BookRepository : ReactiveCrudRepository<Book, Long>, ReactiveQueryByExampleExecutor<Book> {

    fun findAllByOrderByName(example: Example<Book>, position: ScrollPosition): Mono<Window<Book>>

}

Am I missing something, or does Window not work in a Reactive context (yet)?

Find the attached source code with a Unit test to illustrate the problem.
reactive_window_query.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions