Git Product home page Git Product logo

Comments (6)

mxab avatar mxab commented on July 29, 2024 3

I think by default you would expect spring's default object mapper but I also understand that you may want to configure it differently.
Could you add some property like
...graphql.use-default-objectmapper = false and then provide a objectmapper with a certain qualifier?

from graphql-spring-boot.

apottere avatar apottere commented on July 29, 2024

This is tough because there are cases where you'll want your graphql object mapper to behave differently than your spring object mapper. Passing the spring object mapper to graphql-java-servlet automatically would make it impossible to differentiate.

from graphql-spring-boot.

mxab avatar mxab commented on July 29, 2024

@oliemansm I have some suggestion to solve this issue.

First we would need to move the instantiations of the per field objectmapper in the to a provider/factory
graphql-java-kickstart/graphql-java-tools@master...mxab:wip/unify-objectmapper
I added also a backward compatible Provider that behaves like the original instantiations using the configurerer.

Similar but only for the one objectmapper that is constructed by the servlet
graphql-java-kickstart/graphql-java-servlet@master...mxab:wip/unify-objectmapper

Finally can provide these providers that just passthrough the available objectmapper provided by spring boot for both tools and servlet
master...mxab:wip/unify-objectmapper

from graphql-spring-boot.

oliemansm avatar oliemansm commented on July 29, 2024

@mxab Nice! I've created PRs for them so we can get them merged and released.

from graphql-spring-boot.

oliemansm avatar oliemansm commented on July 29, 2024

@mxab Can you give me write permissions on your branch in spring-boot? I merged in master to fix conflicts. That has to be pushed before it can be merged.

from graphql-spring-boot.

mxab avatar mxab commented on July 29, 2024

Cool!

from graphql-spring-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.