Skip to content

Mapping fields for Input Types with different names between schema and Java Object #1146

Open
@gaganis

Description

@gaganis

Is there a way to map fields for input types? I have been unable to find how to do this neither in the documentation or by searching the web.

For example to be able to map full_name in the schema to fullName in the java object:

input CreateUserInput { full_name: String } 

to

public class CreateUserInput { private String fullName; // Must match GraphQL schema public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } } 

We are migrating our app from https://github.com/graphql-java-kickstart and we used to do that using jackson@JsonProperty.

Any pointers would be greatly appreciated

Thanks
Giorgos

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions