Code Monkey home page Code Monkey logo

Comments (11)

michael-simons avatar michael-simons commented on June 3, 2024 4

I see the following issues

  • The GraphQL library that is referenced by Boot 2.7 is newer than the one supported with the current product. To align both, you'll have to bump the spqr.version first
  • There are some deprecation warnings, that are easily fixed as far as I can tell

A necessary change is to adapt how the auto configuration is loaded. Spring Boot 2.7 supports the old way (with spring.factories) and the new way (with org.springframework.boot.autoconfigure.AutoConfiguration.imports plus using now @AutoConfiguration, with the latter not allowing to proxy @Bean methods anymore, but you are doing that anyway).

I'll send a PR in a sec addressing these things. Feel free to edit whatever you want, especially my changes unrelated to auto config (I don't have a clue honestly how the SPQR / GraphQL system works, I'm just here with my dear colleague @SaschaPeukert). The remaining changes to auto config are sane and will allow proper usage in at least Boot 2.7 and most likely with Boot 3 (given that the GraphQL version is compatible).

from graphql-spqr-spring-boot-starter.

kaqqao avatar kaqqao commented on June 3, 2024 1

With GraphQL SPQR v0.12.0 out the door, I will have a look at the state of this project. But, fair warning, there's a good chance that maintaining it in the current shape in light of the official starter is nonsensical. The easiest way forward may be to build a smaller extension on top of the official starter. But that's currently just a theory. Either way, it will take time to explore the options and see what to do,

from graphql-spqr-spring-boot-starter.

MarcinLachowicz avatar MarcinLachowicz commented on June 3, 2024

I would love to have it too

from graphql-spqr-spring-boot-starter.

vmikhnevych avatar vmikhnevych commented on June 3, 2024

The issue I get while upgrading to Boot 2.7 is the following exception:
org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'graphQLSchema' threw exception; nested exception is java.lang.NoClassDefFoundError: graphql/execution/batched/Batched

from graphql-spqr-spring-boot-starter.

kicktipp avatar kicktipp commented on June 3, 2024

It is such a wonderful project, but it is not up-to-date (again). I need to fix it locally to use spring 2.7.

from graphql-spqr-spring-boot-starter.

kicktipp avatar kicktipp commented on June 3, 2024

You can fix it in your gradle build like this:

plugins {
    id 'org.springframework.boot' version "2.7.3"
    // to use  ext['graphql-java.version'] this plugin is needed:
    id "io.spring.dependency-management" version "1.0.13.RELEASE"
}

// https://github.com/leangen/graphql-spqr-spring-boot-starter/issues/119
ext['graphql-java.version'] = '16.2'

from graphql-spqr-spring-boot-starter.

SaschaPeukert avatar SaschaPeukert commented on June 3, 2024

@kicktipp Any maven version for this?

from graphql-spqr-spring-boot-starter.

SaschaPeukert avatar SaschaPeukert commented on June 3, 2024

With Spring-Boot 3.0.0 this problem seems to have become even bigger aka its not compatible anymore because spring changed that spring.factories mechanism

from graphql-spqr-spring-boot-starter.

kaqqao avatar kaqqao commented on June 3, 2024

If any of you would like to help upgrade this to the latest Spring Boot and SPQR versions, please do.

from graphql-spqr-spring-boot-starter.

kaqqao avatar kaqqao commented on June 3, 2024

Thanks a bunch for this! 😊 It's of great help!
There seems to be one place where bean method proxying was unfortunately used, but I'm not sure why... I'll have a look in a second.

from graphql-spqr-spring-boot-starter.

michael-simons avatar michael-simons commented on June 3, 2024

You made the configurational class bean on its own and you can't auto inject into the overloaded method. I pushed this down, so that the configurer is a bean on its own rights, inject the executor. That should work.

from graphql-spqr-spring-boot-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.