Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Unit testing multiple GraphQLQueryResolver interface implementation classes #406

@avdbrink

Description

@avdbrink

I'm trying to write a unit test for my GraphQLQueryResolver implementations. I have different implementations, that use different services.
My GraphQLQueryResolver auto wires a service and I mock these service beans in my unit test, but I didn't expect to have to mock all service bean of all query resolver implementations. I'm testing only one at a time.
I've created a small demo to reproduce the issue.

Maybe this is just me missing out on something obvious, but it seems to me that the @graphqltest annotation brings in all query resolvers, where I only want one. OR is there an easy way to reduce the number of resolvers loaded?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions