Package io.javalin.plugin.graphql.server
Class JavalinGraphQLRequestParser
-
- All Implemented Interfaces:
-
com.expediagroup.graphql.server.execution.GraphQLRequestParser
public final class JavalinGraphQLRequestParser implements GraphQLRequestParser<Context>Parses the request body into a GraphQLServerRequest.
We deliberately do not ask the mapper to deserialize the sealed GraphQLServerRequest directly: graphql-kotlin annotates it for Jackson 3 (
tools.jackson) and fastjson2, while Javalin's default mapper is Jackson 2, so the sealed type has no deserializer it can see. Picking the concrete subtype here keeps the plugin working with whateverJsonMapperthe application has configured instead of forcing a JSON library on it.
-
-
Constructor Summary
Constructors Constructor Description JavalinGraphQLRequestParser()
-
Method Summary
Modifier and Type Method Description GraphQLServerRequestparseRequest(Context request)-
-
Method Detail
-
parseRequest
GraphQLServerRequest parseRequest(Context request)
-
-
-
-