You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We successfully made queries and mutations using the JSON scalar with DGS ('com.netflix.graphql.dgs:graphql-dgs-extended-scalars'). However, we are now trying to test it using the DgsQueryExecutor.executeAndExtractJsonPathAsObject, but we are unable to find a way to get the parsed object.
it("Should return specific show when pass a title filter") {
val advertiserList= dgsQueryExecutor.executeAndExtractJsonPathAsObject("""
{
advertisers{
totalElements
totalPages
content{
name
id
adSets{
renderId
}
}
}
}
""".trimIndent(), "data.advertisers.content",
object : TypeRef<List<Advertiser>>() {})
Error:
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: The given string value: "["300x250", "480x320", "320x480", "728x90", "160x600", "300x600", "320x50", "970x250"]" cannot be transformed
to Json object
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
at com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.execute(DefaultDgsQueryExecutor.kt:95)
at com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.getJsonResult(DefaultDgsQueryExecutor.kt:157)
at com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.executeAndExtractJsonPathAsObject(DefaultDgsQueryExecutor.kt:136)
at com.netflix.graphql.dgs.DgsQueryExecutor.executeAndExtractJsonPathAsObject(DgsQueryExecutor.java:214)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We successfully made queries and mutations using the JSON scalar with DGS ('com.netflix.graphql.dgs:graphql-dgs-extended-scalars'). However, we are now trying to test it using the DgsQueryExecutor.executeAndExtractJsonPathAsObject, but we are unable to find a way to get the parsed object.
Error:
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: The given string value: "["300x250", "480x320", "320x480", "728x90", "160x600", "300x600", "320x50", "970x250"]" cannot be transformed
to Json object
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
at com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.execute(DefaultDgsQueryExecutor.kt:95)
at com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.getJsonResult(DefaultDgsQueryExecutor.kt:157)
at com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.executeAndExtractJsonPathAsObject(DefaultDgsQueryExecutor.kt:136)
at com.netflix.graphql.dgs.DgsQueryExecutor.executeAndExtractJsonPathAsObject(DgsQueryExecutor.java:214)
Beta Was this translation helpful? Give feedback.
All reactions