@@ -45,8 +45,8 @@ class Schema : public std::enable_shared_from_this<Schema>
4545 GRAPHQLSERVICE_EXPORT void AddType (std::string_view name, std::shared_ptr<BaseType> type);
4646 GRAPHQLSERVICE_EXPORT const std::shared_ptr<const BaseType>& LookupType (
4747 std::string_view name) const ;
48- GRAPHQLSERVICE_EXPORT const std::shared_ptr<const BaseType>& WrapType (
49- introspection::TypeKind kind, const std::shared_ptr<const BaseType>& ofType);
48+ GRAPHQLSERVICE_EXPORT std::shared_ptr<const BaseType> WrapType (
49+ introspection::TypeKind kind, std::shared_ptr<const BaseType> ofType);
5050 GRAPHQLSERVICE_EXPORT void AddDirective (std::shared_ptr<Directive> directive);
5151
5252 // Accessors
@@ -67,12 +67,12 @@ class Schema : public std::enable_shared_from_this<Schema>
6767 std::shared_ptr<const ObjectType> _query;
6868 std::shared_ptr<const ObjectType> _mutation;
6969 std::shared_ptr<const ObjectType> _subscription;
70- std::unordered_map <std::string_view, size_t > _typeMap;
70+ internal::sorted_map <std::string_view, size_t > _typeMap;
7171 std::vector<std::pair<std::string_view, std::shared_ptr<const BaseType>>> _types;
7272 std::vector<std::shared_ptr<const Directive>> _directives;
73- std::unordered_map <std::shared_ptr<const BaseType>, std::shared_ptr<const BaseType>>
73+ internal::sorted_map <std::shared_ptr<const BaseType>, std::shared_ptr<const BaseType>>
7474 _nonNullWrappers;
75- std::unordered_map <std::shared_ptr<const BaseType>, std::shared_ptr<const BaseType>>
75+ internal::sorted_map <std::shared_ptr<const BaseType>, std::shared_ptr<const BaseType>>
7676 _listWrappers;
7777};
7878
@@ -282,7 +282,7 @@ class WrapperType : public BaseType
282282 explicit WrapperType (init&& params);
283283
284284 GRAPHQLSERVICE_EXPORT static std::shared_ptr<WrapperType> Make (
285- introspection::TypeKind kind, const std::shared_ptr <const BaseType>& ofType);
285+ introspection::TypeKind kind, std::weak_ptr <const BaseType> ofType);
286286
287287 // Accessors
288288 GRAPHQLSERVICE_EXPORT const std::weak_ptr<const BaseType>& ofType () const noexcept final ;
@@ -303,7 +303,7 @@ class Field : public std::enable_shared_from_this<Field>
303303
304304 GRAPHQLSERVICE_EXPORT static std::shared_ptr<Field> Make (std::string_view name,
305305 std::string_view description, std::optional<std::string_view> deprecationReason,
306- const std::shared_ptr <const BaseType>& type,
306+ std::weak_ptr <const BaseType> type,
307307 std::initializer_list<std::shared_ptr<InputValue>> args = {});
308308
309309 // Accessors
@@ -333,7 +333,7 @@ class InputValue : public std::enable_shared_from_this<InputValue>
333333 explicit InputValue (init&& params);
334334
335335 GRAPHQLSERVICE_EXPORT static std::shared_ptr<InputValue> Make (std::string_view name,
336- std::string_view description, const std::shared_ptr <const BaseType>& type,
336+ std::string_view description, std::weak_ptr <const BaseType> type,
337337 std::string_view defaultValue);
338338
339339 // Accessors
0 commit comments