Closed avmr48shadow closed 8 months ago
I've seen this page : https://github.com/graphql-java-generator/graphql-maven-plugin-project/wiki/client_more_than_one_graphql_servers
I have a probleme with that :
the different endpoints share some common schema also
Hello,
This link should answer your question: https://github.com/graphql-java-generator/graphql-maven-plugin-project/wiki/client_graphql_repository#using-graphql-repositories-with-spring-against-several-graphql-servers
The idea is, when you define a GraphQLRepository, is that one GraphQLRepository can query only one GraphQL server. So, as you have three such servers, you must have three GraphQLRepositories.
Edit: if I understand correctly your last message, there are common types (enums...) between these three schemas. There is currently no way to mix POJOs between two code generation by the plugin (coming from different GraphQL schemas). You can use the dozer library on this use case. This library allows to map an object from one class to another one.
Étienne
Hi,
I use the client generator to query 3 things. The problem is, they are exposed on 3 different endpoints on the server.
I use a @GraphQLRepository which is really great.
Do you know a workaround to be able to attach each method to a specific endpoint. I've tried some things but nothing elegant.
Thank you very much.