8
8
9
9
#include " TodaySchema.h"
10
10
11
- #include " QueryObject.h"
11
+ #include " AppointmentEdgeObject.h"
12
+ #include " AppointmentObject.h"
13
+ #include " FolderEdgeObject.h"
14
+ #include " FolderObject.h"
12
15
#include " MutationObject.h"
13
- #include " SubscriptionObject.h"
14
16
#include " NodeObject.h"
15
17
#include " PageInfoObject.h"
16
- #include " AppointmentEdgeObject.h"
18
+ #include " QueryObject.h"
19
+ #include " SubscriptionObject.h"
17
20
#include " TaskEdgeObject.h"
18
- #include " FolderEdgeObject.h"
19
- #include " AppointmentObject.h"
20
21
#include " TaskObject.h"
21
- #include " FolderObject.h"
22
22
23
23
#include < atomic>
24
+ #include < memory>
24
25
#include < stack>
25
26
26
27
namespace graphql ::today {
@@ -146,14 +147,14 @@ class Appointment
146
147
return _id;
147
148
}
148
149
149
- std::optional< response::Value> getWhen () const noexcept
150
+ std::shared_ptr< const response::Value> getWhen () const noexcept
150
151
{
151
- return std::make_optional<response::Value>( std::string ( _when)) ;
152
+ return _when;
152
153
}
153
154
154
- std::optional<std::string > getSubject () const noexcept
155
+ std::shared_ptr< const response::Value > getSubject () const noexcept
155
156
{
156
- return std::make_optional<std::string>( _subject) ;
157
+ return _subject;
157
158
}
158
159
159
160
bool getIsNow () const noexcept
@@ -168,8 +169,8 @@ class Appointment
168
169
169
170
private:
170
171
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;
173
174
bool _isNow;
174
175
};
175
176
@@ -247,9 +248,9 @@ class Task
247
248
return _id;
248
249
}
249
250
250
- std::optional<std::string > getTitle () const noexcept
251
+ std::shared_ptr< const response::Value > getTitle () const noexcept
251
252
{
252
- return std::make_optional<std::string>( _title) ;
253
+ return _title;
253
254
}
254
255
255
256
bool getIsComplete () const noexcept
@@ -259,7 +260,7 @@ class Task
259
260
260
261
private:
261
262
response::IdType _id;
262
- std::string _title;
263
+ std::shared_ptr< const response::Value> _title;
263
264
bool _isComplete;
264
265
TaskState _state = TaskState::New;
265
266
};
@@ -337,9 +338,9 @@ class Folder
337
338
return _id;
338
339
}
339
340
340
- std::optional<std::string > getName () const noexcept
341
+ std::shared_ptr< const response::Value > getName () const noexcept
341
342
{
342
- return std::make_optional<std::string>( _name) ;
343
+ return _name;
343
344
}
344
345
345
346
int getUnreadCount () const noexcept
@@ -349,7 +350,7 @@ class Folder
349
350
350
351
private:
351
352
response::IdType _id;
352
- std::string _name;
353
+ std::shared_ptr< const response::Value> _name;
353
354
int _unreadCount;
354
355
};
355
356
0 commit comments