leangen / graphql-spqr

Build a GraphQL service in seconds
Apache License 2.0
1.09k stars 181 forks source link

Example/Sample for Spring Webflux and GraphQL SPQR #355

Open sinwailam193 opened 4 years ago

sinwailam193 commented 4 years ago

Hello, thank you for the work on this library, I've been looking for a code-first approach to graphql in Java and this library definitely accomplishes that. I was just wondering is there an example or sample that I can follow or reference for spring webflux and graphql-spqr? Because all the examples on https://github.com/leangen/graphql-spqr-samples are using spring web mvc. And I know that spring starter is still considered Alpha so it shouldn't be used in production if I'm not mistaken. Or is it possible that all the approach for the spring web mvc sample would also work for spring-webflux? Thank you!

Toerktumlare commented 4 years ago

I have experimented, and by pulling in

        <dependency>
            <groupId>io.leangen.graphql</groupId>
            <artifactId>graphql-spqr-spring-boot-starter</artifactId>
            <version>0.0.4</version>
        </dependency>
        <dependency>
            <groupId>io.leangen.graphql</groupId>
            <artifactId>graphql-spqr-spring-boot-autoconfigure</artifactId>
            <version>0.0.4</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-jaxb-annotations</artifactId>
            <version>2.11.1</version>
        </dependency>

i managed to get it working for webflux.

But this project seems dead tbh.