Generating single Query and Mutations on DgsConstants for multiple schemas #1275
Replies: 3 comments 1 reply
-
Can you please provide more details on the error? Codegen assumes each schema is complete but the schema can be define across different files. If they are completely different schemas, then those need to be in different modules with codegen applied individually to each of them. If the schema files belong to the same module, then each file can extend the schema by |
Beta Was this translation helpful? Give feedback.
-
I was trying to do something similar actually. I have 2 different DGS services which are deployed separately. They each have their own schema. I then have a 3rd project that I'm using as a CLI interface into those 2 services and I'd like to copy the schema files from the first 2 projects into my 3rd CLI project so I can generate all the supporting java types. What I tried was this in my gradle file but it didn't work. I had the schema files in 2 different folders and then I was hoping to generate two sets of supporting java files but in their own package (e.g.
|
Beta Was this translation helpful? Give feedback.
-
Thanks @srinivasankavitha. I'm going to give this a shot. |
Beta Was this translation helpful? Give feedback.
-
Recently, we found that when generating code of multiple schemas, all of the queries and mutations are not combined into a single class, which leads into a compilation issue.
I would like to make a change on the generator to resolve that situation on the codegen. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions