...
1
2
3 package followschema
4
5 import (
6 "context"
7
8 "github.com/99designs/gqlgen/graphql"
9 "github.com/vektah/gqlparser/v2/ast"
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 func (ec *executionContext) unmarshalNStringFromContextFunction2string(ctx context.Context, v interface{}) (string, error) {
43 res, err := UnmarshalStringFromContextFunction(ctx, v)
44 return res, graphql.ErrorOnPath(ctx, err)
45 }
46
47 func (ec *executionContext) marshalNStringFromContextFunction2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
48 res := MarshalStringFromContextFunction(v)
49 if res == graphql.Null {
50 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
51 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
52 }
53 }
54 return graphql.WrapContextMarshaler(ctx, res)
55 }
56
57 func (ec *executionContext) unmarshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, v interface{}) (StringFromContextInterface, error) {
58 var res StringFromContextInterface
59 err := res.UnmarshalGQLContext(ctx, v)
60 return res, graphql.ErrorOnPath(ctx, err)
61 }
62
63 func (ec *executionContext) marshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v StringFromContextInterface) graphql.Marshaler {
64 return graphql.WrapContextMarshaler(ctx, v)
65 }
66
67 func (ec *executionContext) unmarshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, v interface{}) (*StringFromContextInterface, error) {
68 var res = new(StringFromContextInterface)
69 err := res.UnmarshalGQLContext(ctx, v)
70 return res, graphql.ErrorOnPath(ctx, err)
71 }
72
73 func (ec *executionContext) marshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v *StringFromContextInterface) graphql.Marshaler {
74 if v == nil {
75 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
76 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
77 }
78 return graphql.Null
79 }
80 return graphql.WrapContextMarshaler(ctx, v)
81 }
82
83
84
View as plain text