88
99#include " TodaySchema.h"
1010
11- #include " QueryObject.h"
11+ #include " AppointmentEdgeObject.h"
12+ #include " AppointmentObject.h"
13+ #include " FolderEdgeObject.h"
14+ #include " FolderObject.h"
1215#include " MutationObject.h"
13- #include " SubscriptionObject.h"
1416#include " NodeObject.h"
1517#include " PageInfoObject.h"
16- #include " AppointmentEdgeObject.h"
18+ #include " QueryObject.h"
19+ #include " SubscriptionObject.h"
1720#include " TaskEdgeObject.h"
18- #include " FolderEdgeObject.h"
19- #include " AppointmentObject.h"
2021#include " TaskObject.h"
21- #include " FolderObject.h"
2222
2323#include < atomic>
24+ #include < memory>
2425#include < stack>
2526
2627namespace graphql ::today {
@@ -146,14 +147,14 @@ class Appointment
146147 return _id;
147148 }
148149
149- std::optional< response::Value> getWhen () const noexcept
150+ std::shared_ptr< const response::Value> getWhen () const noexcept
150151 {
151- return std::make_optional<response::Value>( std::string ( _when)) ;
152+ return _when;
152153 }
153154
154- std::optional<std::string > getSubject () const noexcept
155+ std::shared_ptr< const response::Value > getSubject () const noexcept
155156 {
156- return std::make_optional<std::string>( _subject) ;
157+ return _subject;
157158 }
158159
159160 bool getIsNow () const noexcept
@@ -168,8 +169,8 @@ class Appointment
168169
169170private:
170171 response::IdType _id;
171- std::string _when;
172- std::string _subject;
172+ std::shared_ptr< const response::Value> _when;
173+ std::shared_ptr< const response::Value> _subject;
173174 bool _isNow;
174175};
175176
@@ -247,9 +248,9 @@ class Task
247248 return _id;
248249 }
249250
250- std::optional<std::string > getTitle () const noexcept
251+ std::shared_ptr< const response::Value > getTitle () const noexcept
251252 {
252- return std::make_optional<std::string>( _title) ;
253+ return _title;
253254 }
254255
255256 bool getIsComplete () const noexcept
@@ -259,7 +260,7 @@ class Task
259260
260261private:
261262 response::IdType _id;
262- std::string _title;
263+ std::shared_ptr< const response::Value> _title;
263264 bool _isComplete;
264265 TaskState _state = TaskState::New;
265266};
@@ -337,9 +338,9 @@ class Folder
337338 return _id;
338339 }
339340
340- std::optional<std::string > getName () const noexcept
341+ std::shared_ptr< const response::Value > getName () const noexcept
341342 {
342- return std::make_optional<std::string>( _name) ;
343+ return _name;
343344 }
344345
345346 int getUnreadCount () const noexcept
@@ -349,7 +350,7 @@ class Folder
349350
350351private:
351352 response::IdType _id;
352- std::string _name;
353+ std::shared_ptr< const response::Value> _name;
353354 int _unreadCount;
354355};
355356
0 commit comments