Skip to content

Generating multiple clients in one project #939

Answered by dariuszkuc
TobiasBales asked this question in Q&A
Discussion options

You must be logged in to vote

Hello 👋
If you are using Gradle it should be possible to generate multiple clients from different schemas. It might be possible to do in Maven by forcing specific phases to order the tasks but unsure if it will work.

It is pretty ugly as that was not one of our use cases but following should work

// configuration to generate first client against gscheibel/graphql-kotlin-demo
graphql {
    client {
        sdlEndpoint = "http://localhost:8080/sdl"
        packageName = "com.example.generated"
        clientType = GraphQLClientType.WEBCLIENT
        queryFileDirectory = "${project.projectDir.absolutePath}/src/main/resources/first"
    }
}

// above graphql extension configuration is equival…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@TobiasBales
Comment options

@dariuszkuc
Comment options

@TobiasBales
Comment options

@dariuszkuc
Comment options

@TobiasBales
Comment options

Answer selected by dariuszkuc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #939 on November 13, 2020 20:51.