Skip to content

Commit 063dd54

Browse files
committed
Move more headers into graphqlservice/internal
1 parent a224fea commit 063dd54

26 files changed

+105
-103
lines changed

doc/parsing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ you have another use for a GraphQL parser you could probably make a few small
1717
tweaks to include additional information in the rules or in the resulting AST.
1818
You could also use the grammar without the AST module if you want to handle
1919
the parsing callbacks another way. The grammar itself is defined in
20-
[GraphQLGrammar.h](../include/graphqlservice/GraphQLGrammar.h), and the AST
21-
selector callbacks are all defined in [GraphQLTree.cpp](../src/GraphQLTree.cpp).
20+
[Grammar.h](../include/graphqlservice/internal/Grammar.h), and the AST
21+
selector callbacks are all defined in [SyntaxTree.cpp](../src/SyntaxTree.cpp).
2222
The grammar handles both the schema definition syntax which is used in
2323
`schemagen`, and the query/mutation/subscription operation syntax used in
2424
`Request::resolve` and `Request::subscribe`.

include/RequestLoader.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88

99
#include "GeneratorLoader.h"
1010

11-
#include "graphqlservice/GraphQLGrammar.h"
1211
#include "graphqlservice/GraphQLParse.h"
13-
#include "graphqlservice/GraphQLSchema.h"
1412
#include "graphqlservice/GraphQLService.h"
1513

14+
#include "graphqlservice/internal/Grammar.h"
15+
#include "graphqlservice/internal/Schema.h"
16+
1617
namespace graphql::generator {
1718

1819
using RequestSchemaType = std::shared_ptr<const schema::BaseType>;

include/SchemaLoader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
#include "GeneratorLoader.h"
1010

11-
#include "graphqlservice/GraphQLGrammar.h"
1211
#include "graphqlservice/GraphQLParse.h"
1312
#include "graphqlservice/GraphQLService.h"
1413

14+
#include "graphqlservice/internal/Grammar.h"
15+
1516
#include <array>
1617
#include <unordered_map>
1718
#include <unordered_set>

include/Validation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
#ifndef VALIDATION_H
77
#define VALIDATION_H
88

9-
#include "graphqlservice/GraphQLSchema.h"
109
#include "graphqlservice/GraphQLService.h"
1110

11+
#include "graphqlservice/internal/Schema.h"
12+
1213
namespace graphql::service {
1314

1415
using ValidateType = std::optional<std::reference_wrapper<const schema::BaseType>>;

include/graphqlservice/GraphQLGrammar.h renamed to include/graphqlservice/internal/Grammar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef GRAPHQLGRAMMAR_H
1010
#define GRAPHQLGRAMMAR_H
1111

12-
#include "graphqlservice/GraphQLTree.h"
12+
#include "graphqlservice/internal/SyntaxTree.h"
1313

1414
#define TAO_PEGTL_NAMESPACE tao::graphqlpeg
1515

include/graphqlservice/GraphQLSchema.h renamed to include/graphqlservice/internal/Schema.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ class Field : public std::enable_shared_from_this<Field>
307307

308308
GRAPHQLSERVICE_EXPORT static std::shared_ptr<Field> Make(std::string_view name,
309309
std::string_view description, std::optional<std::string_view> deprecationReason,
310-
std::weak_ptr<const BaseType> type, std::vector<std::shared_ptr<const InputValue>>&& args = {});
310+
std::weak_ptr<const BaseType> type,
311+
std::vector<std::shared_ptr<const InputValue>>&& args = {});
311312

312313
// Accessors
313314
GRAPHQLSERVICE_EXPORT std::string_view name() const noexcept;

include/graphqlservice/introspection/Introspection.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
#ifndef INTROSPECTION_H
77
#define INTROSPECTION_H
88

9-
#include "graphqlservice/GraphQLSchema.h"
9+
#include "graphqlservice/internal/Schema.h"
10+
1011
#include "graphqlservice/introspection/IntrospectionSchema.h"
1112

1213
namespace graphql::introspection {

include/graphqlservice/introspection/IntrospectionSchema.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
#ifndef INTROSPECTIONSCHEMA_H
99
#define INTROSPECTIONSCHEMA_H
1010

11-
#include "graphqlservice/GraphQLSchema.h"
12-
#include "graphqlservice/GraphQLService.h"
11+
#include "graphqlservice/internal/Schema.h"
1312

1413
// Check if the library version is compatible with schemagen 3.6.0
1514
static_assert(graphql::internal::MajorVersion == 3, "regenerate with schemagen: major version mismatch");

samples/separate/TodaySchema.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
#ifndef TODAYSCHEMA_H
99
#define TODAYSCHEMA_H
1010

11-
#include "graphqlservice/GraphQLSchema.h"
12-
#include "graphqlservice/GraphQLService.h"
11+
#include "graphqlservice/internal/Schema.h"
1312

1413
// Check if the library version is compatible with schemagen 3.6.0
1514
static_assert(graphql::internal::MajorVersion == 3, "regenerate with schemagen: major version mismatch");

0 commit comments

Comments
 (0)