Skip to content

Can this be used for replacing an existing GraphqQL implementation gradually ? #202

New issue

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

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

Already on GitHub? Sign in to your account

Open
aynesh opened this issue Mar 26, 2025 · 0 comments

Comments

@aynesh
Copy link

aynesh commented Mar 26, 2025

Currently, we have a use case where we have a graphql implementation (using spqr library) which we are trying to replace with sping-boot-graphql.

@Component
class SpringBootImplementation(
    private val executionGraphQlService: ExecutionGraphQlService,
    private val graphQlSource: GraphQlSource
) : ServiceProvider { ... }

@Component
class SpqrImplementation(
    @Qualifier("restGraphql") private val graphql: GraphQL
) : ServiceProvider { ... }

        // create a runtimeGraph by stitching service providers
        val runtimeGraph = SchemaStitcher.newBuilder()
            .service(springBootImplementation)
            .service(spqrImplementation)
            .build()
            .stitchGraph()

        graphQLOrchestrator = GraphQLOrchestrator.newOrchestrator()
            .runtimeGraph(runtimeGraph).build()

Is this possible? Or am I missing something? Let's say the same type is present in both implementations, including the same exact queries. In SpringBootImplementation we will add gradually and replace existing implementations from SpqrImplementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant