Open soumyarsamal opened 1 month ago
I faced the same issue when trying to use second schema
Hello,
Did you check the client_more_than_one_graphql_servers doc ?
The two important things to manage, here are:
targetSourceFolder
for at least one schema, so that the generated code for your two GraphQL schema are generated in different foldersspringBeanSuffix
for at least one of the schemas (but it's more readable to provide one for each)In the provided conf, the first condition is met, but not the second one.
Etienne
Hello Etienne,
Thanks for your response.
We have a non spring application, so springBeanSuffix is of no use
We have already provided targetSourceFolder but due to duplicate class names under com.graphql_java_generator we are getting compilation error (please refer above screenshot)
Is there any way we resolve this issue ?
Hello,
I think you have no choice here, but use springBeanSuffix
, and what's described in this page
Hi Team, We tried generating POJO for two graphql endpoint in a single project, we are able to generate pojo but it is creating duplicate class names under folder target/generated-sources/graphql-java-generator which is failing on compile time
duplicate classes are of folder(annotations, customscaler,execption,server.Util,util)
-> we tried generating both endpoint POJO on a single folder but it is only generating for the first task under execution tag
Question: how to not generate com.graphQl_java_generator folder for second schema
Below we have mentioned our pom.xml and attached screenshot for reference
Please help us resolving our issue
‹plugin> ‹groupId>com.graphql-java-generator «artifactId>graphql-maven-plugin «version>1.17.3‹/version> ‹executions> ‹execution>
‹configuration> «targetSourceFolder>target/generated-sources/graphql-naven-plugin/can «schemaFileFolder>src/test/resources/gql/files/cam/ ‹generateJPAAnnotation>false‹/generateJPAAnnotation> «schemaFilePattern>*.graphql «separateUtilityClasses>trues/separateUtilityclasses> ‹packageName>model.gql.cam «generateDeprecatedRequestResponse>false ‹mode>server «skipGenerationIfSchemaHasNotChanged>false
‹goals> ‹goal-generatePojo ‹/execution> sexecution>
«configuration> < targetSourceFolder»target/generated-sources/graphql-maven-plugin/gl</targetsourceFolder» «SChemaFileFolder>src/test/resources/gql/g/${environment}/</schemaFiLeFoLder» «generateJPAAnnotation>false «schemaFilePattern>*.graphql «separateUtilityClasses>trues/separateutilityCLasses> ‹packageName>model.gql.gl≤/packageName> «generateDeprecatedRequestResponse>false‹/generateDeprecatedRequestResponse> ‹mode>server «skipGenerationIfSchemaHasNotChanged>false caddRelayConnections>true‹/addRelayConnections> ‹goals> ‹goal>generatePojo </ goals> ‹/execution>