|
11 | 11 | #include "IntrospectionSchema.h" |
12 | 12 |
|
13 | 13 | namespace graphql::introspection::object { |
14 | | -namespace methods::FieldHas { |
15 | | - |
16 | | -template <class TImpl> |
17 | | -concept getNameWithParams = requires (TImpl impl, service::FieldParams params) |
18 | | -{ |
19 | | - { service::FieldResult<std::string> { impl.getName(std::move(params)) } }; |
20 | | -}; |
21 | | - |
22 | | -template <class TImpl> |
23 | | -concept getName = requires (TImpl impl) |
24 | | -{ |
25 | | - { service::FieldResult<std::string> { impl.getName() } }; |
26 | | -}; |
27 | | - |
28 | | -template <class TImpl> |
29 | | -concept getDescriptionWithParams = requires (TImpl impl, service::FieldParams params) |
30 | | -{ |
31 | | - { service::FieldResult<std::optional<std::string>> { impl.getDescription(std::move(params)) } }; |
32 | | -}; |
33 | | - |
34 | | -template <class TImpl> |
35 | | -concept getDescription = requires (TImpl impl) |
36 | | -{ |
37 | | - { service::FieldResult<std::optional<std::string>> { impl.getDescription() } }; |
38 | | -}; |
39 | | - |
40 | | -template <class TImpl> |
41 | | -concept getArgsWithParams = requires (TImpl impl, service::FieldParams params) |
42 | | -{ |
43 | | - { service::FieldResult<std::vector<std::shared_ptr<InputValue>>> { impl.getArgs(std::move(params)) } }; |
44 | | -}; |
45 | | - |
46 | | -template <class TImpl> |
47 | | -concept getArgs = requires (TImpl impl) |
48 | | -{ |
49 | | - { service::FieldResult<std::vector<std::shared_ptr<InputValue>>> { impl.getArgs() } }; |
50 | | -}; |
51 | | - |
52 | | -template <class TImpl> |
53 | | -concept getTypeWithParams = requires (TImpl impl, service::FieldParams params) |
54 | | -{ |
55 | | - { service::FieldResult<std::shared_ptr<Type>> { impl.getType(std::move(params)) } }; |
56 | | -}; |
57 | | - |
58 | | -template <class TImpl> |
59 | | -concept getType = requires (TImpl impl) |
60 | | -{ |
61 | | - { service::FieldResult<std::shared_ptr<Type>> { impl.getType() } }; |
62 | | -}; |
63 | | - |
64 | | -template <class TImpl> |
65 | | -concept getIsDeprecatedWithParams = requires (TImpl impl, service::FieldParams params) |
66 | | -{ |
67 | | - { service::FieldResult<bool> { impl.getIsDeprecated(std::move(params)) } }; |
68 | | -}; |
69 | | - |
70 | | -template <class TImpl> |
71 | | -concept getIsDeprecated = requires (TImpl impl) |
72 | | -{ |
73 | | - { service::FieldResult<bool> { impl.getIsDeprecated() } }; |
74 | | -}; |
75 | | - |
76 | | -template <class TImpl> |
77 | | -concept getDeprecationReasonWithParams = requires (TImpl impl, service::FieldParams params) |
78 | | -{ |
79 | | - { service::FieldResult<std::optional<std::string>> { impl.getDeprecationReason(std::move(params)) } }; |
80 | | -}; |
81 | | - |
82 | | -template <class TImpl> |
83 | | -concept getDeprecationReason = requires (TImpl impl) |
84 | | -{ |
85 | | - { service::FieldResult<std::optional<std::string>> { impl.getDeprecationReason() } }; |
86 | | -}; |
87 | | - |
88 | | -template <class TImpl> |
89 | | -concept beginSelectionSet = requires (TImpl impl, const service::SelectionSetParams params) |
90 | | -{ |
91 | | - { impl.beginSelectionSet(params) }; |
92 | | -}; |
93 | | - |
94 | | -template <class TImpl> |
95 | | -concept endSelectionSet = requires (TImpl impl, const service::SelectionSetParams params) |
96 | | -{ |
97 | | - { impl.endSelectionSet(params) }; |
98 | | -}; |
99 | | - |
100 | | -} // namespace methods::FieldHas |
101 | 14 |
|
102 | 15 | class Field |
103 | 16 | : public service::Object |
|
0 commit comments