Skip to content

Subscription deserialization error when not using Apollo protocol #252

Closed
@WenSteven

Description

@WenSteven

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions