Skip to content

Ability to generate only root interface with all queries/mutations/subscriptions #270

@jxnu-liguobin

Description

@jxnu-liguobin

Issue Description

Describe your bug in detail.
option ApiRootInterfaceStrategy default value is SINGLE_INTERFACE . literally, only one resolver query and resolver mutation will be generated.
I tried both gradle and SBT, and the results were the same.there have generated resolver for every graphql query.
As a result, I have too many useless classes under the API package, because I only need a resolver that contains all interfaces.

Steps to Reproduce

List in detail the exact steps to reproduce the unexpected behavior.

Expected Result

when set apiRootInterfaceStrategy := com.kobylynskyi.graphql.codegen.model.ApiRootInterfaceStrategy.SINGLE_INTERFACE, only a query resolver java file will generate.

So, can I not generate other resolvers?

Actual Result

Explain in detail what behavior actually happened.

Your Environment and Setup

  • graphql-java-codegen: E.g.: 2.4.1
  • Build tool: E.g.: Maven
  • Java tool: E.g.: Oracle 8u241
  • Mapping Config: E.g.:
<configuration>
    <outputDir>${project.build.directory}/generated-sources/graphql</outputDir>
    <packageName>io.github.kobylynskyi.graphql.model</packageName>
</configuration>

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions