forked from 99designs/gqlgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stub.go
314 lines (289 loc) · 12.9 KB
/
stub.go
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
306
307
308
309
310
311
312
313
314
// Code generated by github.com/qhenkart/gqlgen, DO NOT EDIT.
package testserver
import (
"context"
introspection1 "github.com/qhenkart/gqlgen/codegen/testserver/introspection"
invalid_packagename "github.com/qhenkart/gqlgen/codegen/testserver/invalid-packagename"
)
type Stub struct {
ErrorsResolver struct {
A func(ctx context.Context, obj *Errors) (*Error, error)
B func(ctx context.Context, obj *Errors) (*Error, error)
C func(ctx context.Context, obj *Errors) (*Error, error)
D func(ctx context.Context, obj *Errors) (*Error, error)
E func(ctx context.Context, obj *Errors) (*Error, error)
}
ForcedResolverResolver struct {
Field func(ctx context.Context, obj *ForcedResolver) (*Circle, error)
}
ModelMethodsResolver struct {
ResolverField func(ctx context.Context, obj *ModelMethods) (bool, error)
}
OverlappingFieldsResolver struct {
OldFoo func(ctx context.Context, obj *OverlappingFields) (int, error)
}
PanicsResolver struct {
FieldScalarMarshal func(ctx context.Context, obj *Panics) ([]MarshalPanic, error)
ArgUnmarshal func(ctx context.Context, obj *Panics, u []MarshalPanic) (bool, error)
}
PrimitiveResolver struct {
Value func(ctx context.Context, obj *Primitive) (int, error)
}
PrimitiveStringResolver struct {
Value func(ctx context.Context, obj *PrimitiveString) (string, error)
Len func(ctx context.Context, obj *PrimitiveString) (int, error)
}
QueryResolver struct {
InvalidIdentifier func(ctx context.Context) (*invalid_packagename.InvalidIdentifier, error)
Collision func(ctx context.Context) (*introspection1.It, error)
MapInput func(ctx context.Context, input map[string]interface{}) (*bool, error)
Recursive func(ctx context.Context, input *RecursiveInputSlice) (*bool, error)
NestedInputs func(ctx context.Context, input [][]*OuterInput) (*bool, error)
NestedOutputs func(ctx context.Context) ([][]*OuterObject, error)
Shapes func(ctx context.Context) ([]Shape, error)
ModelMethods func(ctx context.Context) (*ModelMethods, error)
User func(ctx context.Context, id int) (*User, error)
NullableArg func(ctx context.Context, arg *int) (*string, error)
InputSlice func(ctx context.Context, arg []string) (bool, error)
ShapeUnion func(ctx context.Context) (ShapeUnion, error)
Autobind func(ctx context.Context) (*Autobind, error)
DeprecatedField func(ctx context.Context) (string, error)
Overlapping func(ctx context.Context) (*OverlappingFields, error)
DirectiveArg func(ctx context.Context, arg string) (*string, error)
DirectiveNullableArg func(ctx context.Context, arg *int, arg2 *int, arg3 *string) (*string, error)
DirectiveInputNullable func(ctx context.Context, arg *InputDirectives) (*string, error)
DirectiveInput func(ctx context.Context, arg InputDirectives) (*string, error)
DirectiveInputType func(ctx context.Context, arg InnerInput) (*string, error)
DirectiveObject func(ctx context.Context) (*ObjectDirectives, error)
DirectiveFieldDef func(ctx context.Context, ret string) (string, error)
DirectiveField func(ctx context.Context) (*string, error)
DirectiveDouble func(ctx context.Context) (*string, error)
MapStringInterface func(ctx context.Context, in map[string]interface{}) (map[string]interface{}, error)
ErrorBubble func(ctx context.Context) (*Error, error)
Errors func(ctx context.Context) (*Errors, error)
Valid func(ctx context.Context) (string, error)
Panics func(ctx context.Context) (*Panics, error)
PrimitiveObject func(ctx context.Context) ([]Primitive, error)
PrimitiveStringObject func(ctx context.Context) ([]PrimitiveString, error)
DefaultScalar func(ctx context.Context, arg string) (string, error)
Slices func(ctx context.Context) (*Slices, error)
ScalarSlice func(ctx context.Context) ([]byte, error)
Fallback func(ctx context.Context, arg FallbackToStringEncoding) (FallbackToStringEncoding, error)
OptionalUnion func(ctx context.Context) (TestUnion, error)
ValidType func(ctx context.Context) (*ValidType, error)
WrappedStruct func(ctx context.Context) (*WrappedStruct, error)
WrappedScalar func(ctx context.Context) (WrappedScalar, error)
}
SubscriptionResolver struct {
Updated func(ctx context.Context) (<-chan string, error)
InitPayload func(ctx context.Context) (<-chan string, error)
}
UserResolver struct {
Friends func(ctx context.Context, obj *User) ([]*User, error)
}
}
func (r *Stub) Errors() ErrorsResolver {
return &stubErrors{r}
}
func (r *Stub) ForcedResolver() ForcedResolverResolver {
return &stubForcedResolver{r}
}
func (r *Stub) ModelMethods() ModelMethodsResolver {
return &stubModelMethods{r}
}
func (r *Stub) OverlappingFields() OverlappingFieldsResolver {
return &stubOverlappingFields{r}
}
func (r *Stub) Panics() PanicsResolver {
return &stubPanics{r}
}
func (r *Stub) Primitive() PrimitiveResolver {
return &stubPrimitive{r}
}
func (r *Stub) PrimitiveString() PrimitiveStringResolver {
return &stubPrimitiveString{r}
}
func (r *Stub) Query() QueryResolver {
return &stubQuery{r}
}
func (r *Stub) Subscription() SubscriptionResolver {
return &stubSubscription{r}
}
func (r *Stub) User() UserResolver {
return &stubUser{r}
}
type stubErrors struct{ *Stub }
func (r *stubErrors) A(ctx context.Context, obj *Errors) (*Error, error) {
return r.ErrorsResolver.A(ctx, obj)
}
func (r *stubErrors) B(ctx context.Context, obj *Errors) (*Error, error) {
return r.ErrorsResolver.B(ctx, obj)
}
func (r *stubErrors) C(ctx context.Context, obj *Errors) (*Error, error) {
return r.ErrorsResolver.C(ctx, obj)
}
func (r *stubErrors) D(ctx context.Context, obj *Errors) (*Error, error) {
return r.ErrorsResolver.D(ctx, obj)
}
func (r *stubErrors) E(ctx context.Context, obj *Errors) (*Error, error) {
return r.ErrorsResolver.E(ctx, obj)
}
type stubForcedResolver struct{ *Stub }
func (r *stubForcedResolver) Field(ctx context.Context, obj *ForcedResolver) (*Circle, error) {
return r.ForcedResolverResolver.Field(ctx, obj)
}
type stubModelMethods struct{ *Stub }
func (r *stubModelMethods) ResolverField(ctx context.Context, obj *ModelMethods) (bool, error) {
return r.ModelMethodsResolver.ResolverField(ctx, obj)
}
type stubOverlappingFields struct{ *Stub }
func (r *stubOverlappingFields) OldFoo(ctx context.Context, obj *OverlappingFields) (int, error) {
return r.OverlappingFieldsResolver.OldFoo(ctx, obj)
}
type stubPanics struct{ *Stub }
func (r *stubPanics) FieldScalarMarshal(ctx context.Context, obj *Panics) ([]MarshalPanic, error) {
return r.PanicsResolver.FieldScalarMarshal(ctx, obj)
}
func (r *stubPanics) ArgUnmarshal(ctx context.Context, obj *Panics, u []MarshalPanic) (bool, error) {
return r.PanicsResolver.ArgUnmarshal(ctx, obj, u)
}
type stubPrimitive struct{ *Stub }
func (r *stubPrimitive) Value(ctx context.Context, obj *Primitive) (int, error) {
return r.PrimitiveResolver.Value(ctx, obj)
}
type stubPrimitiveString struct{ *Stub }
func (r *stubPrimitiveString) Value(ctx context.Context, obj *PrimitiveString) (string, error) {
return r.PrimitiveStringResolver.Value(ctx, obj)
}
func (r *stubPrimitiveString) Len(ctx context.Context, obj *PrimitiveString) (int, error) {
return r.PrimitiveStringResolver.Len(ctx, obj)
}
type stubQuery struct{ *Stub }
func (r *stubQuery) InvalidIdentifier(ctx context.Context) (*invalid_packagename.InvalidIdentifier, error) {
return r.QueryResolver.InvalidIdentifier(ctx)
}
func (r *stubQuery) Collision(ctx context.Context) (*introspection1.It, error) {
return r.QueryResolver.Collision(ctx)
}
func (r *stubQuery) MapInput(ctx context.Context, input map[string]interface{}) (*bool, error) {
return r.QueryResolver.MapInput(ctx, input)
}
func (r *stubQuery) Recursive(ctx context.Context, input *RecursiveInputSlice) (*bool, error) {
return r.QueryResolver.Recursive(ctx, input)
}
func (r *stubQuery) NestedInputs(ctx context.Context, input [][]*OuterInput) (*bool, error) {
return r.QueryResolver.NestedInputs(ctx, input)
}
func (r *stubQuery) NestedOutputs(ctx context.Context) ([][]*OuterObject, error) {
return r.QueryResolver.NestedOutputs(ctx)
}
func (r *stubQuery) Shapes(ctx context.Context) ([]Shape, error) {
return r.QueryResolver.Shapes(ctx)
}
func (r *stubQuery) ModelMethods(ctx context.Context) (*ModelMethods, error) {
return r.QueryResolver.ModelMethods(ctx)
}
func (r *stubQuery) User(ctx context.Context, id int) (*User, error) {
return r.QueryResolver.User(ctx, id)
}
func (r *stubQuery) NullableArg(ctx context.Context, arg *int) (*string, error) {
return r.QueryResolver.NullableArg(ctx, arg)
}
func (r *stubQuery) InputSlice(ctx context.Context, arg []string) (bool, error) {
return r.QueryResolver.InputSlice(ctx, arg)
}
func (r *stubQuery) ShapeUnion(ctx context.Context) (ShapeUnion, error) {
return r.QueryResolver.ShapeUnion(ctx)
}
func (r *stubQuery) Autobind(ctx context.Context) (*Autobind, error) {
return r.QueryResolver.Autobind(ctx)
}
func (r *stubQuery) DeprecatedField(ctx context.Context) (string, error) {
return r.QueryResolver.DeprecatedField(ctx)
}
func (r *stubQuery) Overlapping(ctx context.Context) (*OverlappingFields, error) {
return r.QueryResolver.Overlapping(ctx)
}
func (r *stubQuery) DirectiveArg(ctx context.Context, arg string) (*string, error) {
return r.QueryResolver.DirectiveArg(ctx, arg)
}
func (r *stubQuery) DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (*string, error) {
return r.QueryResolver.DirectiveNullableArg(ctx, arg, arg2, arg3)
}
func (r *stubQuery) DirectiveInputNullable(ctx context.Context, arg *InputDirectives) (*string, error) {
return r.QueryResolver.DirectiveInputNullable(ctx, arg)
}
func (r *stubQuery) DirectiveInput(ctx context.Context, arg InputDirectives) (*string, error) {
return r.QueryResolver.DirectiveInput(ctx, arg)
}
func (r *stubQuery) DirectiveInputType(ctx context.Context, arg InnerInput) (*string, error) {
return r.QueryResolver.DirectiveInputType(ctx, arg)
}
func (r *stubQuery) DirectiveObject(ctx context.Context) (*ObjectDirectives, error) {
return r.QueryResolver.DirectiveObject(ctx)
}
func (r *stubQuery) DirectiveFieldDef(ctx context.Context, ret string) (string, error) {
return r.QueryResolver.DirectiveFieldDef(ctx, ret)
}
func (r *stubQuery) DirectiveField(ctx context.Context) (*string, error) {
return r.QueryResolver.DirectiveField(ctx)
}
func (r *stubQuery) DirectiveDouble(ctx context.Context) (*string, error) {
return r.QueryResolver.DirectiveDouble(ctx)
}
func (r *stubQuery) MapStringInterface(ctx context.Context, in map[string]interface{}) (map[string]interface{}, error) {
return r.QueryResolver.MapStringInterface(ctx, in)
}
func (r *stubQuery) ErrorBubble(ctx context.Context) (*Error, error) {
return r.QueryResolver.ErrorBubble(ctx)
}
func (r *stubQuery) Errors(ctx context.Context) (*Errors, error) {
return r.QueryResolver.Errors(ctx)
}
func (r *stubQuery) Valid(ctx context.Context) (string, error) {
return r.QueryResolver.Valid(ctx)
}
func (r *stubQuery) Panics(ctx context.Context) (*Panics, error) {
return r.QueryResolver.Panics(ctx)
}
func (r *stubQuery) PrimitiveObject(ctx context.Context) ([]Primitive, error) {
return r.QueryResolver.PrimitiveObject(ctx)
}
func (r *stubQuery) PrimitiveStringObject(ctx context.Context) ([]PrimitiveString, error) {
return r.QueryResolver.PrimitiveStringObject(ctx)
}
func (r *stubQuery) DefaultScalar(ctx context.Context, arg string) (string, error) {
return r.QueryResolver.DefaultScalar(ctx, arg)
}
func (r *stubQuery) Slices(ctx context.Context) (*Slices, error) {
return r.QueryResolver.Slices(ctx)
}
func (r *stubQuery) ScalarSlice(ctx context.Context) ([]byte, error) {
return r.QueryResolver.ScalarSlice(ctx)
}
func (r *stubQuery) Fallback(ctx context.Context, arg FallbackToStringEncoding) (FallbackToStringEncoding, error) {
return r.QueryResolver.Fallback(ctx, arg)
}
func (r *stubQuery) OptionalUnion(ctx context.Context) (TestUnion, error) {
return r.QueryResolver.OptionalUnion(ctx)
}
func (r *stubQuery) ValidType(ctx context.Context) (*ValidType, error) {
return r.QueryResolver.ValidType(ctx)
}
func (r *stubQuery) WrappedStruct(ctx context.Context) (*WrappedStruct, error) {
return r.QueryResolver.WrappedStruct(ctx)
}
func (r *stubQuery) WrappedScalar(ctx context.Context) (WrappedScalar, error) {
return r.QueryResolver.WrappedScalar(ctx)
}
type stubSubscription struct{ *Stub }
func (r *stubSubscription) Updated(ctx context.Context) (<-chan string, error) {
return r.SubscriptionResolver.Updated(ctx)
}
func (r *stubSubscription) InitPayload(ctx context.Context) (<-chan string, error) {
return r.SubscriptionResolver.InitPayload(ctx)
}
type stubUser struct{ *Stub }
func (r *stubUser) Friends(ctx context.Context, obj *User) ([]*User, error) {
return r.UserResolver.Friends(ctx, obj)
}