1
1
import GraphQL
2
2
3
3
public extension Type {
4
- @discardableResult
5
4
/// Define and add the federated key to this type.
6
5
///
7
6
/// For more information, see https://www.apollographql.com/docs/federation/entities
8
7
/// - Parameters:
9
8
/// - function: The resolver function used to load this entity based on the key value.
10
9
/// - _: The key value. The name of this argument must match a Type field.
11
10
/// - Returns: Self for chaining.
11
+ @discardableResult
12
12
func key< Arguments: Codable > (
13
13
at function: @escaping AsyncResolve < Resolver , Context , Arguments , ObjectType ? > ,
14
14
@ArgumentComponentBuilder < Arguments > _ argument: ( ) -> ArgumentComponent < Arguments >
@@ -17,14 +17,14 @@ public extension Type {
17
17
return self
18
18
}
19
19
20
- @discardableResult
21
20
/// Define and add the federated key to this type.
22
21
///
23
22
/// For more information, see https://www.apollographql.com/docs/federation/entities
24
23
/// - Parameters:
25
24
/// - function: The resolver function used to load this entity based on the key value.
26
25
/// - _: The key values. The names of these arguments must match Type fields.
27
26
/// - Returns: Self for chaining.
27
+ @discardableResult
28
28
func key< Arguments: Codable > (
29
29
at function: @escaping AsyncResolve < Resolver , Context , Arguments , ObjectType ? > ,
30
30
@ArgumentComponentBuilder < Arguments > _ arguments: ( )
@@ -34,14 +34,14 @@ public extension Type {
34
34
return self
35
35
}
36
36
37
- @discardableResult
38
37
/// Define and add the federated key to this type.
39
38
///
40
39
/// For more information, see https://www.apollographql.com/docs/federation/entities
41
40
/// - Parameters:
42
41
/// - function: The resolver function used to load this entity based on the key value.
43
42
/// - _: The key value. The name of this argument must match a Type field.
44
43
/// - Returns: Self for chaining.
44
+ @discardableResult
45
45
func key< Arguments: Codable > (
46
46
at function: @escaping SimpleAsyncResolve < Resolver , Context , Arguments , ObjectType ? > ,
47
47
@ArgumentComponentBuilder < Arguments > _ argument: ( ) -> ArgumentComponent < Arguments >
@@ -50,14 +50,14 @@ public extension Type {
50
50
return self
51
51
}
52
52
53
- @discardableResult
54
53
/// Define and add the federated key to this type.
55
54
///
56
55
/// For more information, see https://www.apollographql.com/docs/federation/entities
57
56
/// - Parameters:
58
57
/// - function: The resolver function used to load this entity based on the key value.
59
58
/// - _: The key values. The names of these arguments must match Type fields.
60
59
/// - Returns: Self for chaining.
60
+ @discardableResult
61
61
func key< Arguments: Codable > (
62
62
at function: @escaping SimpleAsyncResolve < Resolver , Context , Arguments , ObjectType ? > ,
63
63
@ArgumentComponentBuilder < Arguments > _ arguments: ( )
@@ -67,14 +67,14 @@ public extension Type {
67
67
return self
68
68
}
69
69
70
- @discardableResult
71
70
/// Define and add the federated key to this type.
72
71
///
73
72
/// For more information, see https://www.apollographql.com/docs/federation/entities
74
73
/// - Parameters:
75
74
/// - function: The resolver function used to load this entity based on the key value.
76
75
/// - _: The key value. The name of this argument must match a Type field.
77
76
/// - Returns: Self for chaining.
77
+ @discardableResult
78
78
func key< Arguments: Codable > (
79
79
at function: @escaping SyncResolve < Resolver , Context , Arguments , ObjectType ? > ,
80
80
@ArgumentComponentBuilder < Arguments > _ arguments: ( )
@@ -84,14 +84,14 @@ public extension Type {
84
84
return self
85
85
}
86
86
87
- @discardableResult
88
87
/// Define and add the federated key to this type.
89
88
///
90
89
/// For more information, see https://www.apollographql.com/docs/federation/entities
91
90
/// - Parameters:
92
91
/// - function: The resolver function used to load this entity based on the key value.
93
92
/// - _: The key values. The names of these arguments must match Type fields.
94
93
/// - Returns: Self for chaining.
94
+ @discardableResult
95
95
func key< Arguments: Codable > (
96
96
at function: @escaping SyncResolve < Resolver , Context , Arguments , ObjectType ? > ,
97
97
@ArgumentComponentBuilder < Arguments > _ argument: ( ) -> ArgumentComponent < Arguments >
@@ -102,15 +102,15 @@ public extension Type {
102
102
}
103
103
104
104
public extension Type {
105
- @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
106
- @discardableResult
107
105
/// Define and add the federated key to this type.
108
106
///
109
107
/// For more information, see https://www.apollographql.com/docs/federation/entities
110
108
/// - Parameters:
111
109
/// - function: The resolver function used to load this entity based on the key value.
112
110
/// - _: The key value. The name of this argument must match a Type field.
113
111
/// - Returns: Self for chaining.
112
+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
113
+ @discardableResult
114
114
func key< Arguments: Codable > (
115
115
at function: @escaping ConcurrentResolve < Resolver , Context , Arguments , ObjectType ? > ,
116
116
@ArgumentComponentBuilder < Arguments > _ argument: ( ) -> ArgumentComponent < Arguments >
@@ -119,15 +119,15 @@ public extension Type {
119
119
return self
120
120
}
121
121
122
- @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
123
- @discardableResult
124
122
/// Define and add the federated key to this type.
125
123
///
126
124
/// For more information, see https://www.apollographql.com/docs/federation/entities
127
125
/// - Parameters:
128
126
/// - function: The resolver function used to load this entity based on the key value.
129
127
/// - _: The key values. The names of these arguments must match Type fields.
130
128
/// - Returns: Self for chaining.
129
+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
130
+ @discardableResult
131
131
func key< Arguments: Codable > (
132
132
at function: @escaping ConcurrentResolve < Resolver , Context , Arguments , ObjectType ? > ,
133
133
@ArgumentComponentBuilder < Arguments > _ arguments: ( ) -> [ ArgumentComponent < Arguments > ]
0 commit comments