Skip to content

Use auto-configured JSON codecs in GraphQlTesterAutoConfiguration #30646

New issue

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

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

Already on GitHub? # to your account

Closed
bclozel opened this issue Apr 12, 2022 · 0 comments
Closed

Use auto-configured JSON codecs in GraphQlTesterAutoConfiguration #30646

bclozel opened this issue Apr 12, 2022 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Apr 12, 2022

As seen in spring-projects/spring-graphql#345, our current auto-configuration for the ExecutionGraphQlServiceTester is not aligned with the HttpGraphQlTester auto-configuration behavior. HttpGraphQlTester is based on an existing, auto-configured WebTestClient with JSON codecs. On the other hand, ExecutionGraphQlServiceTester is using its default builder with the default JSON codec configuration.

We should use the newly introduced encoder(Encoder<?>) and decoder(Decoder<?>) methods on the builder with Jackson codecs honoring the application configuration.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant