wildfly-extras / wildfly-graphql-feature-pack

5 stars 7 forks source link

GraphQL endpoint still uses resteasy's jsonb with yasson provider ignoring preferJacksonOverJsonB context param. #12

Closed mircea-cm closed 4 years ago

mircea-cm commented 4 years ago

Hello, Creating a jaxrs + graphql project and setting web.xml context params to:

    <context-param>
        <param-name>resteasy.jsonp.enable</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>resteasy.preferJacksonOverJsonB</param-name>
        <param-value>true</param-value>
    </context-param>

works in REST endpoint, successfully using Jackson deserializer whereas in graphql endpoint it gives me java.time.format.DateTimeParseException

Error is as follows:

Caused by: java.time.format.DateTimeParseException: Text '1753-01-01T00:00:00.000+0100' could not be parsed, unparsed text found at index 23
        at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2049)
        at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1948)
        at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:598)
        at org.eclipse.yasson//org.eclipse.yasson.internal.serializer.DateTypeDeserializer.parseWithOrWithoutZone(DateTypeDeserializer.java:83)
        at org.eclipse.yasson//org.eclipse.yasson.internal.serializer.DateTypeDeserializer.parseDefault(DateTypeDeserializer.java:54)
        at org.eclipse.yasson//org.eclipse.yasson.internal.serializer.DateTypeDeserializer.parseDefault(DateTypeDeserializer.java:34)
        at org.eclipse.yasson//org.eclipse.yasson.internal.serializer.AbstractDateTimeDeserializer.deserialize(AbstractDateTimeDeserializer.java:69)
        ... 40 more

where we can see that for the graphql endpoint it ignores Wildfly context property to use Jackson.

PS: If I delete those context-params I get the same error in rest endpoint.

mircea-cm commented 4 years ago

Cannot fully reproduce on an empty project.