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
Describe the bug
java.lang.IllegalArgumentException: Cannot construct instance of graphql.kickstart.execution.GraphQLRequest (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('{ "query": "subscription CustomerImportSub { stockQuotes(stockCodes:[12]) {taskCount completedCount}}", "variables": {} }') at [Source: UNKNOWN; line: -1, column: -1] at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:4202) ~[jackson-databind-2.11.0.jar:2.11.0] at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:4133) ~[jackson-databind-2.11.0.jar:2.11.0] at graphql.kickstart.execution.subscriptions.GraphQLSubscriptionMapper.readGraphQLRequest(GraphQLSubscriptionMapper.java:16) ~[graphql-java-servlet-9.1.0.jar:na]
To Reproduce
this demo also get same error!!
I think GraphQLSubscriptionMapper.readGraphQLRequest should use ObjectMapper#readValue not convertValue
oliemansm
changed the title
Cannot construct instance of "" no String-argument constructor/factory method to deserialize from String value
Subscription deserialization error when not using Apollo protocol
May 20, 2020
GraphiQL uses the Apollo protocol, which is also the one I use in my projects, and in that case the subscription mapper is working fine as indicated. Judging by the code it could be that when you're not using Apollo protocol but it uses the FallbackSubscriptionConsumer you run into this problem. The subscription mapper should support both cases.
Describe the bug
java.lang.IllegalArgumentException: Cannot construct instance of
graphql.kickstart.execution.GraphQLRequest
(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('{ "query": "subscription CustomerImportSub { stockQuotes(stockCodes:[12]) {taskCount completedCount}}", "variables": {} }') at [Source: UNKNOWN; line: -1, column: -1] at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:4202) ~[jackson-databind-2.11.0.jar:2.11.0] at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:4133) ~[jackson-databind-2.11.0.jar:2.11.0] at graphql.kickstart.execution.subscriptions.GraphQLSubscriptionMapper.readGraphQLRequest(GraphQLSubscriptionMapper.java:16) ~[graphql-java-servlet-9.1.0.jar:na]To Reproduce
this demo also get same error!!
I think GraphQLSubscriptionMapper.readGraphQLRequest should use ObjectMapper#readValue not convertValue
Screenshots
https://github.com/graphql-java-kickstart/graphql-spring-boot/tree/master/example-graphql-subscription
this demo has same error
The text was updated successfully, but these errors were encountered: