Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Configure GraphQLServlet object mapper #32

@miguelaferreira

Description

@miguelaferreira

It's possible to configure the object mapper used by the GraphQLServlet via a custom implementation of the (functional) interface ObjectMapperConfigurer (see graphql-java-kickstart/graphql-java-servlet@8f55785).

I would expect it to be possible to register a bean of such implementation in the application context and have it injected in the GraphQLServlet. However this doesn't seem to be possible yet.

Here's what I'm trying to do:

@SpringBootApplication
public class Application {

(...)

    @Bean
    ObjectMapperConfigurer objectMapperConfigurer() {
        return (ObjectMapper mapper) -> mapper.registerModule(new JavaTimeModule());
    }

(...)

}

Is this something that needs to be implemented yet? Or am I going about it the wrong way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions