Skip to content

How to map a field from a Java class to a type property with a different name? #383

@Shpota

Description

@Shpota

I have a type definition with a filed that has underscores in its name:

type Book {
    reviews_count: Int
}

Q: Is there a possibility to use reviewsCount instead of reviews_count in Java code? (an analog of @JsonProperty from Jackson)

Note: I do not want to remap all camel case notations to type properties with underscores. It is only needed for this particular field.

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