File tree Expand file tree Collapse file tree 2 files changed +10
-24
lines changed
include/graphqlservice/introspection Expand file tree Collapse file tree 2 files changed +10
-24
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,14 @@ enum class DirectiveLocation
67
67
INPUT_FIELD_DEFINITION
68
68
};
69
69
70
- namespace object {
71
-
72
70
class Schema ;
73
71
class Type ;
74
72
class Field ;
75
73
class InputValue ;
76
74
class EnumValue ;
77
75
class Directive ;
78
76
79
- } // namespace object
77
+ namespace object {
80
78
81
79
class Schema ;
82
80
class Type ;
@@ -85,8 +83,6 @@ class InputValue;
85
83
class EnumValue ;
86
84
class Directive ;
87
85
88
- namespace object {
89
-
90
86
class Schema
91
87
: public service::Object
92
88
{
Original file line number Diff line number Diff line change @@ -254,6 +254,14 @@ static_assert(graphql::internal::MinorVersion == )cpp"
254
254
{
255
255
if (_loader.isIntrospection ())
256
256
{
257
+ // Forward declare all of the concrete types for the Introspection schema
258
+ for (const auto & objectType : _loader.getObjectTypes ())
259
+ {
260
+ headerFile << R"cpp( class )cpp" << objectType.cppType << R"cpp( ;
261
+ )cpp" ;
262
+ }
263
+
264
+ headerFile << std::endl;
257
265
}
258
266
259
267
objectNamespace.enter ();
@@ -308,25 +316,7 @@ static_assert(graphql::internal::MinorVersion == )cpp"
308
316
309
317
if (!_loader.getObjectTypes ().empty () && _options.mergeFiles )
310
318
{
311
- if (_loader.isIntrospection ())
312
- {
313
- if (objectNamespace.exit ())
314
- {
315
- headerFile << std::endl;
316
- }
317
-
318
- // Forward declare all of the concrete types for the Introspection schema
319
- for (const auto & objectType : _loader.getObjectTypes ())
320
- {
321
- headerFile << R"cpp( class )cpp" << objectType.cppType << R"cpp( ;
322
- )cpp" ;
323
- }
324
-
325
- headerFile << std::endl;
326
- objectNamespace.enter ();
327
- headerFile << std::endl;
328
- }
329
- else
319
+ if (!_loader.isIntrospection ())
330
320
{
331
321
objectNamespace.enter ();
332
322
You can’t perform that action at this time.
0 commit comments