Skip to content

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

Open
@aynesh

Description

@aynesh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions