Skip to content

Commit 7af225c

Browse files
committed
feat: implement Schema merge
1 parent a610521 commit 7af225c

File tree

2 files changed

+605
-0
lines changed

2 files changed

+605
-0
lines changed

include/graphqlservice/internal/Schema.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class [[nodiscard("unnecessary construction")]] Schema : public std::enable_shar
4545
GRAPHQLSERVICE_EXPORT explicit Schema(
4646
bool noIntrospection = false, std::string_view description = "");
4747

48+
GRAPHQLSERVICE_EXPORT std::shared_ptr<Schema> StitchSchema(
49+
const std::shared_ptr<const Schema>& added) const;
50+
4851
GRAPHQLSERVICE_EXPORT void AddQueryType(std::shared_ptr<ObjectType> query);
4952
GRAPHQLSERVICE_EXPORT void AddMutationType(std::shared_ptr<ObjectType> mutation);
5053
GRAPHQLSERVICE_EXPORT void AddSubscriptionType(std::shared_ptr<ObjectType> subscription);
@@ -74,6 +77,9 @@ class [[nodiscard("unnecessary construction")]] Schema : public std::enable_shar
7477
directives() const noexcept;
7578

7679
private:
80+
[[nodiscard("unnecessary call")]] std::shared_ptr<const BaseType> StitchFieldType(
81+
std::shared_ptr<const BaseType> fieldType);
82+
7783
const bool _noIntrospection = false;
7884
const std::string_view _description;
7985

0 commit comments

Comments
 (0)