Comments (7)
UPD:
As far as i can see, new schema is getting copied to out folder with correct content but for some reason DGS doesn't reload it
type Query {
hey(name: String! = "Spring"): String!
}
Digged into sources, tried to debug more:
boolean hotReloadSetting = env.getProperty("dgs.reload", Boolean.class);
shows true
. What else needs to be checked ?
from dgs-framework.
UPD2:
As i can see in case of Spring Gradle plugin is being used i have to add ext['kotlin.version'] = '1.4.31'
it leads to things get broken at all
2024-01-13T18:09:02.024+03:00 INFO 26848 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-01-13T18:09:02.049+03:00 ERROR 26848 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.beans.BeanUtils$KotlinDelegate.findPrimaryConstructor(BeanUtils.java:861)
The following method did not exist:
'boolean kotlin.reflect.KClass.isValue()'
The calling method's class, org.springframework.beans.BeanUtils$KotlinDelegate, was loaded from the following location:
jar:file:/C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/6.1.2/abf52f2254975a3b1e95b2b63fb8b01d891cdc51/spring-beans-6.1.2.jar!/org/springframework/beans/BeanUtils$KotlinDelegate.class
The called method's class, kotlin.reflect.KClass, is available from the following locations:
jar:file:/C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.31/a58e0fb9812a6a93ca24b5da75e4b5a0cb89c957/kotlin-stdlib-1.4.31.jar!/kotlin/reflect/KClass.class
The called method's class hierarchy was loaded from the following locations:
kotlin.reflect.KClass: file:/C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.31/a58e0fb9812a6a93ca24b5da75e4b5a0cb89c957/kotlin-stdlib-1.4.31.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.beans.BeanUtils$KotlinDelegate and kotlin.reflect.KClass
Here is build.gradle deps
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.hibernate.orm' version '6.4.1.Final'
id 'org.graalvm.buildtools.native' version '0.9.27'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
}
...
dependencyManagement {
imports {
mavenBom("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:latest.release")
}
}
ext['kotlin.version'] = '1.4.31'
dependencies {
...
implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter'
}
from dgs-framework.
Upd3:
I can see in release that kotlin has update, so tried next thing
ext['kotlin.version'] = '1.9.22'
and it's make it start but hot-reload still doesn't work, have no clue what could be wrong 🤔
from dgs-framework.
@baikov-ilia I just validated the reload behavior and it works, so I'm not sure why it's not working for you.
In Intellij you need to explicitly "build" (cmnd-f9 on Macos) for file to be copied, so make sure you do that.
The next thing you could try is set a breakpoint in DgsSchemaProvider
to see if it goes through the re-loading logic.
I'm going to close this issue for now, assuming it's something related to your setup, since the functionality seems to be working fine.
from dgs-framework.
Yep, found out that in order to sync schema from resources folder to build it's needed to run processResources
manually in idea and schema is being reloaded on a next request. No clue on how to run this task after a build, but seems like reload is working.
from dgs-framework.
from dgs-framework.
What build system are you using? I was testing with Gradle, and that "just works" in Intellij if I hit the "build" command. I'm actually really not sure about other builds systems.
I'm using Gradle along with JRebel since devtools throw some exception related to classpath when mapstruct is used. Firing processResources
even when JRebel is running helps to update schema and then it is get reloaded fine.
from dgs-framework.
Related Issues (20)
- documentation: Enhancing documentation on Spring Security integration limitations in DGS Framework HOT 3
- feature: subscription HTTP callback support HOT 6
- Stack Overflow (Criteria.parse) with JsonPath HOT 8
- bug: Registering customer mapper bean leads to exception HOT 7
- bug: DataFetchingEnvironment::localContext overwritten by Spring Actuator for Nested Data Fetchers HOT 3
- bug: DGS 8.2.2 doesn't work out of the box with spring-boot 3.2.1 because of a reactor version mismatch
- bug: timer threads created in WebsocketGraphQLTransportWSProtocolHandler persist after session closes HOT 1
- bug: client throws error when parsing response with error. HOT 2
- bug: Extended JSON scalar serialization not working for mutation input HOT 1
- bug: Make path field of GraphQLError nullable HOT 6
- documentation: error handling example is outdated for currentl graphql-java version HOT 3
- bug: Application context fails to load after upgrade to springboot 3.x HOT 4
- InputMapDefinesTooManyFieldsException: Cancel Field Validation HOT 1
- bug: BaseDgsQueryExecutor silently handles exceptions from instrumentations HOT 5
- feature: Allow specifying custom scalars when generating queries using Kotlin query projections HOT 11
- bug: webRequest.getResponse() is null HOT 5
- bug: CORS errors in frontend app only after updating to v6 (with SpringBoot 3) HOT 1
- Scalar backed by value class inside input type fail to deserialize HOT 3
- bug: No qualifying bean of type 'com.fasterxml.jackson.databind.ObjectMapper' available HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgs-framework.