-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathTodaySchema.h
305 lines (251 loc) · 11.4 KB
/
TodaySchema.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// WARNING! Do not edit this file manually, your changes will be overwritten.
#pragma once
#ifndef TODAYSCHEMA_H
#define TODAYSCHEMA_H
#include "graphqlservice/internal/Schema.h"
// Check if the library version is compatible with schemagen 4.5.0
static_assert(graphql::internal::MajorVersion == 4, "regenerate with schemagen: major version mismatch");
static_assert(graphql::internal::MinorVersion == 5, "regenerate with schemagen: minor version mismatch");
#include <array>
#include <memory>
#include <string>
#include <string_view>
namespace graphql {
namespace today {
enum class [[nodiscard("unnecessary conversion")]] TaskState
{
Unassigned,
New,
Started,
Complete
};
[[nodiscard("unnecessary call")]] constexpr auto getTaskStateNames() noexcept
{
using namespace std::literals;
return std::array<std::string_view, 4> {
R"gql(Unassigned)gql"sv,
R"gql(New)gql"sv,
R"gql(Started)gql"sv,
R"gql(Complete)gql"sv
};
}
[[nodiscard("unnecessary call")]] constexpr auto getTaskStateValues() noexcept
{
using namespace std::literals;
return std::array<std::pair<std::string_view, TaskState>, 4> {
std::make_pair(R"gql(New)gql"sv, TaskState::New),
std::make_pair(R"gql(Started)gql"sv, TaskState::Started),
std::make_pair(R"gql(Complete)gql"sv, TaskState::Complete),
std::make_pair(R"gql(Unassigned)gql"sv, TaskState::Unassigned)
};
}
struct [[nodiscard("unnecessary construction")]] CompleteTaskInput
{
explicit CompleteTaskInput() noexcept;
explicit CompleteTaskInput(
response::IdType idArg,
std::optional<TaskState> testTaskStateArg,
std::optional<bool> isCompleteArg,
std::optional<std::string> clientMutationIdArg) noexcept;
CompleteTaskInput(const CompleteTaskInput& other);
CompleteTaskInput(CompleteTaskInput&& other) noexcept;
~CompleteTaskInput();
CompleteTaskInput& operator=(const CompleteTaskInput& other);
CompleteTaskInput& operator=(CompleteTaskInput&& other) noexcept;
response::IdType id;
std::optional<TaskState> testTaskState;
std::optional<bool> isComplete;
std::optional<std::string> clientMutationId;
};
struct SecondNestedInput;
struct [[nodiscard("unnecessary construction")]] ThirdNestedInput
{
explicit ThirdNestedInput() noexcept;
explicit ThirdNestedInput(
response::IdType idArg,
std::unique_ptr<SecondNestedInput> secondArg) noexcept;
ThirdNestedInput(const ThirdNestedInput& other);
ThirdNestedInput(ThirdNestedInput&& other) noexcept;
~ThirdNestedInput();
ThirdNestedInput& operator=(const ThirdNestedInput& other);
ThirdNestedInput& operator=(ThirdNestedInput&& other) noexcept;
response::IdType id;
std::unique_ptr<SecondNestedInput> second;
};
struct [[nodiscard("unnecessary construction")]] FourthNestedInput
{
explicit FourthNestedInput() noexcept;
explicit FourthNestedInput(
response::IdType idArg) noexcept;
FourthNestedInput(const FourthNestedInput& other);
FourthNestedInput(FourthNestedInput&& other) noexcept;
~FourthNestedInput();
FourthNestedInput& operator=(const FourthNestedInput& other);
FourthNestedInput& operator=(FourthNestedInput&& other) noexcept;
response::IdType id;
};
struct [[nodiscard("unnecessary construction")]] IncludeNullableSelfInput
{
explicit IncludeNullableSelfInput() noexcept;
explicit IncludeNullableSelfInput(
std::unique_ptr<IncludeNullableSelfInput> selfArg) noexcept;
IncludeNullableSelfInput(const IncludeNullableSelfInput& other);
IncludeNullableSelfInput(IncludeNullableSelfInput&& other) noexcept;
~IncludeNullableSelfInput();
IncludeNullableSelfInput& operator=(const IncludeNullableSelfInput& other);
IncludeNullableSelfInput& operator=(IncludeNullableSelfInput&& other) noexcept;
std::unique_ptr<IncludeNullableSelfInput> self;
};
struct [[nodiscard("unnecessary construction")]] IncludeNonNullableListSelfInput
{
explicit IncludeNonNullableListSelfInput() noexcept;
explicit IncludeNonNullableListSelfInput(
std::vector<IncludeNonNullableListSelfInput> selvesArg) noexcept;
IncludeNonNullableListSelfInput(const IncludeNonNullableListSelfInput& other);
IncludeNonNullableListSelfInput(IncludeNonNullableListSelfInput&& other) noexcept;
~IncludeNonNullableListSelfInput();
IncludeNonNullableListSelfInput& operator=(const IncludeNonNullableListSelfInput& other);
IncludeNonNullableListSelfInput& operator=(IncludeNonNullableListSelfInput&& other) noexcept;
std::vector<IncludeNonNullableListSelfInput> selves;
};
struct [[nodiscard("unnecessary construction")]] StringOperationFilterInput
{
explicit StringOperationFilterInput() noexcept;
explicit StringOperationFilterInput(
std::optional<std::vector<StringOperationFilterInput>> and_Arg,
std::optional<std::vector<StringOperationFilterInput>> or_Arg,
std::optional<std::string> equalArg,
std::optional<std::string> notEqualArg,
std::optional<std::string> containsArg,
std::optional<std::string> notContainsArg,
std::optional<std::vector<std::string>> inArg,
std::optional<std::vector<std::string>> notInArg,
std::optional<std::string> startsWithArg,
std::optional<std::string> notStartsWithArg,
std::optional<std::string> endsWithArg,
std::optional<std::string> notEndsWithArg) noexcept;
StringOperationFilterInput(const StringOperationFilterInput& other);
StringOperationFilterInput(StringOperationFilterInput&& other) noexcept;
~StringOperationFilterInput();
StringOperationFilterInput& operator=(const StringOperationFilterInput& other);
StringOperationFilterInput& operator=(StringOperationFilterInput&& other) noexcept;
std::optional<std::vector<StringOperationFilterInput>> and_;
std::optional<std::vector<StringOperationFilterInput>> or_;
std::optional<std::string> equal;
std::optional<std::string> notEqual;
std::optional<std::string> contains;
std::optional<std::string> notContains;
std::optional<std::vector<std::string>> in;
std::optional<std::vector<std::string>> notIn;
std::optional<std::string> startsWith;
std::optional<std::string> notStartsWith;
std::optional<std::string> endsWith;
std::optional<std::string> notEndsWith;
};
struct [[nodiscard("unnecessary construction")]] SecondNestedInput
{
explicit SecondNestedInput() noexcept;
explicit SecondNestedInput(
response::IdType idArg,
ThirdNestedInput thirdArg) noexcept;
SecondNestedInput(const SecondNestedInput& other);
SecondNestedInput(SecondNestedInput&& other) noexcept;
~SecondNestedInput();
SecondNestedInput& operator=(const SecondNestedInput& other);
SecondNestedInput& operator=(SecondNestedInput&& other) noexcept;
response::IdType id;
ThirdNestedInput third;
};
struct [[nodiscard("unnecessary construction")]] ForwardDeclaredInput
{
explicit ForwardDeclaredInput() noexcept;
explicit ForwardDeclaredInput(
std::unique_ptr<IncludeNullableSelfInput> nullableSelfArg,
IncludeNonNullableListSelfInput listSelvesArg) noexcept;
ForwardDeclaredInput(const ForwardDeclaredInput& other);
ForwardDeclaredInput(ForwardDeclaredInput&& other) noexcept;
~ForwardDeclaredInput();
ForwardDeclaredInput& operator=(const ForwardDeclaredInput& other);
ForwardDeclaredInput& operator=(ForwardDeclaredInput&& other) noexcept;
std::unique_ptr<IncludeNullableSelfInput> nullableSelf;
IncludeNonNullableListSelfInput listSelves;
};
struct [[nodiscard("unnecessary construction")]] FirstNestedInput
{
explicit FirstNestedInput() noexcept;
explicit FirstNestedInput(
response::IdType idArg,
SecondNestedInput secondArg,
ThirdNestedInput thirdArg) noexcept;
FirstNestedInput(const FirstNestedInput& other);
FirstNestedInput(FirstNestedInput&& other) noexcept;
~FirstNestedInput();
FirstNestedInput& operator=(const FirstNestedInput& other);
FirstNestedInput& operator=(FirstNestedInput&& other) noexcept;
response::IdType id;
SecondNestedInput second;
ThirdNestedInput third;
};
namespace object {
class Node;
class UnionType;
class Query;
class PageInfo;
class AppointmentEdge;
class AppointmentConnection;
class TaskEdge;
class TaskConnection;
class FolderEdge;
class FolderConnection;
class CompleteTaskPayload;
class Mutation;
class Subscription;
class Appointment;
class Task;
class Folder;
class NestedType;
class Expensive;
} // namespace object
class [[nodiscard("unnecessary construction")]] Operations final
: public service::Request
{
public:
explicit Operations(std::shared_ptr<object::Query> query, std::shared_ptr<object::Mutation> mutation, std::shared_ptr<object::Subscription> subscription);
template <class TQuery, class TMutation, class TSubscription = service::SubscriptionPlaceholder>
explicit Operations(std::shared_ptr<TQuery> query, std::shared_ptr<TMutation> mutation, std::shared_ptr<TSubscription> subscription = {})
: Operations {
std::make_shared<object::Query>(std::move(query)),
std::make_shared<object::Mutation>(std::move(mutation)),
subscription ? std::make_shared<object::Subscription>(std::move(subscription)) : std::shared_ptr<object::Subscription> {}
}
{
}
private:
std::shared_ptr<object::Query> _query;
std::shared_ptr<object::Mutation> _mutation;
std::shared_ptr<object::Subscription> _subscription;
};
void AddNodeDetails(const std::shared_ptr<schema::InterfaceType>& typeNode, const std::shared_ptr<schema::Schema>& schema);
void AddUnionTypeDetails(const std::shared_ptr<schema::UnionType>& typeUnionType, const std::shared_ptr<schema::Schema>& schema);
void AddQueryDetails(const std::shared_ptr<schema::ObjectType>& typeQuery, const std::shared_ptr<schema::Schema>& schema);
void AddPageInfoDetails(const std::shared_ptr<schema::ObjectType>& typePageInfo, const std::shared_ptr<schema::Schema>& schema);
void AddAppointmentEdgeDetails(const std::shared_ptr<schema::ObjectType>& typeAppointmentEdge, const std::shared_ptr<schema::Schema>& schema);
void AddAppointmentConnectionDetails(const std::shared_ptr<schema::ObjectType>& typeAppointmentConnection, const std::shared_ptr<schema::Schema>& schema);
void AddTaskEdgeDetails(const std::shared_ptr<schema::ObjectType>& typeTaskEdge, const std::shared_ptr<schema::Schema>& schema);
void AddTaskConnectionDetails(const std::shared_ptr<schema::ObjectType>& typeTaskConnection, const std::shared_ptr<schema::Schema>& schema);
void AddFolderEdgeDetails(const std::shared_ptr<schema::ObjectType>& typeFolderEdge, const std::shared_ptr<schema::Schema>& schema);
void AddFolderConnectionDetails(const std::shared_ptr<schema::ObjectType>& typeFolderConnection, const std::shared_ptr<schema::Schema>& schema);
void AddCompleteTaskPayloadDetails(const std::shared_ptr<schema::ObjectType>& typeCompleteTaskPayload, const std::shared_ptr<schema::Schema>& schema);
void AddMutationDetails(const std::shared_ptr<schema::ObjectType>& typeMutation, const std::shared_ptr<schema::Schema>& schema);
void AddSubscriptionDetails(const std::shared_ptr<schema::ObjectType>& typeSubscription, const std::shared_ptr<schema::Schema>& schema);
void AddAppointmentDetails(const std::shared_ptr<schema::ObjectType>& typeAppointment, const std::shared_ptr<schema::Schema>& schema);
void AddTaskDetails(const std::shared_ptr<schema::ObjectType>& typeTask, const std::shared_ptr<schema::Schema>& schema);
void AddFolderDetails(const std::shared_ptr<schema::ObjectType>& typeFolder, const std::shared_ptr<schema::Schema>& schema);
void AddNestedTypeDetails(const std::shared_ptr<schema::ObjectType>& typeNestedType, const std::shared_ptr<schema::Schema>& schema);
void AddExpensiveDetails(const std::shared_ptr<schema::ObjectType>& typeExpensive, const std::shared_ptr<schema::Schema>& schema);
std::shared_ptr<schema::Schema> GetSchema();
} // namespace today
} // namespace graphql
#endif // TODAYSCHEMA_H