spring-graphql
spring-graphql copied to clipboard
Example to use Spring GraphQL with a federation library
Is there any example project with Spring GraphQL on how to configure the service inorder to be used with a federation library like Apollo ?
@ragavlatha It's pretty straightforward. Have a look at my repository that I used few weeks ago to report an issue https://github.com/MariuszCwikla/spring-graphql-federation-union-issue
@Bean
public GraphQlSourceBuilderCustomizer exposeFederation () {
return builder -> {
builder.schemaFactory((registry, wiring)->
Federation.transform(registry, wiring).build()
);
};
}
This repo does not present how to build federated supergraph but actually it's straighforward to do it with Apollo Router.
We don't have an example, but would be good to have it, possibly at apollographql/federation-jvm.
Hello 👋 I created an example integration under https://github.com/apollographql/federation-jvm-spring-example.
https://github.com/apollographql/federation-jvm-spring-example link is broken @dariuszkuc
@dariuszkuc a belated thanks for putting that together! @bishopmate the link does work for me. I'm going to turn this into a documentation task to refer to the above sample from our reference docs.