File tree Expand file tree Collapse file tree 4 files changed +24
-5
lines changed
Expand file tree Collapse file tree 4 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 33
44// WARNING! Do not edit this file manually, your changes will be overwritten.
55
6- #include " StarWarsObjects.h"
6+ #include " QueryObject.h"
7+ #include " MutationObject.h"
78
89#include " graphqlservice/introspection/Introspection.h"
910
Original file line number Diff line number Diff line change 33
44// WARNING! Do not edit this file manually, your changes will be overwritten.
55
6- #include " TodayObjects.h"
6+ #include " QueryObject.h"
7+ #include " MutationObject.h"
8+ #include " SubscriptionObject.h"
79
810#include " graphqlservice/introspection/Introspection.h"
911
Original file line number Diff line number Diff line change 33
44// WARNING! Do not edit this file manually, your changes will be overwritten.
55
6- #include " TodayObjects.h"
6+ #include " QueryObject.h"
7+ #include " MutationObject.h"
8+ #include " SubscriptionObject.h"
79
810#include " graphqlservice/introspection/Introspection.h"
911
Original file line number Diff line number Diff line change @@ -575,10 +575,24 @@ bool Generator::outputSource() const noexcept
575575
576576 if (!_loader.isIntrospection ())
577577 {
578- sourceFile << R"cpp( #include ")cpp" << fs::path (_objectHeaderPath).filename ().string ()
579- << R"cpp( "
578+ if (!_options.separateFiles )
579+ {
580+
581+ sourceFile << R"cpp( #include ")cpp" << fs::path (_headerPath).filename ().string ()
582+ << R"cpp( "
580583
581584)cpp" ;
585+ }
586+ else
587+ {
588+ for (const auto & operation : _loader.getOperationTypes ())
589+ {
590+ sourceFile << R"cpp( #include ")cpp" << operation.cppType << R"cpp( Object.h"
591+ )cpp" ;
592+ }
593+
594+ sourceFile << std::endl;
595+ }
582596 }
583597
584598 sourceFile << R"cpp( #include "graphqlservice/introspection/Introspection.h"
You can’t perform that action at this time.
0 commit comments