Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I override an Entity field dataFetcher? #303

Open
brendanmoorep opened this issue Apr 11, 2022 · 0 comments
Open

How can I override an Entity field dataFetcher? #303

brendanmoorep opened this issue Apr 11, 2022 · 0 comments

Comments

@brendanmoorep
Copy link

Is there a way that I can override or add custom logic to the dataFetcher for a field of my entity?

For example, if I have a column "status" that is an integer column, but I'd like the API to respond with the status's corresponding enum value, how could I go about doing that?

@Entity
public class MyEntity {

        // other fields omitted

        // This will return the integer status, how can I return a corresponding ENUM value instead?
        @Column
	@GraphQLDescription("The status")
	private int status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant