I am using Spring Boot and Netflix's DGS library for GraphQL on the backend. Our app has multiple modules (multi-gradle project) and each module is responsible for one thing. Therefore, I wanted to split GQL schema into multiple files based on the business logic of that module (let's say we have packages like cars, people, animals and parent module app, which contains the main SpringBootApp class), so I want only mutations and queries for one particular package on the path and not others. (I don't want to see Mutations for cars in the animal package)
Problem is that I cannot have multiple definitions of the Mutation type in the project, so I tried to put extend type Mutation, but this fails when I run my tests because they don't know the parent since the only schema for cars is copied and not the parent.
I also tried to create some Gradle task, that would copy the schema and remove the extend keyword from the file, which would work, but it's not the best solution.
Another option would be perhaps to create a new type for mutations like UseMutation, CarMutation, but not sure if that is the correct approach.
Do you have any other ideas, how to work and deal with this schema separation? Thanks a lot.