Skip to content

ZonedDateTime serialization error (Version: 2.4.1) #260

@ClaudiuGuja

Description

@ClaudiuGuja

Issue: ZonedDateTime string not escaped.

When sending a variable through graphql of type ZonedDateTime, in GraphQLRequestSerializer method getEntry, the ZonedDateTime goes through the last else branch, and toString() is called on it. This leads to a request that does not fit the JSON format and a BadRequest exception is thrown.

Instead, when sending a string that contains the result of toString() called on the ZonedDateTime, the string is escaped at line 100 of GraphQLRequestSerializer, and the call is made correctly.

Possible solutions:

  • add another branch to the getEntry method
  • ability to inject a custom ObjectMapper into GraphQLRequestSerializer. Sadly this means no static methods and brings with it another host of problems

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions