|
|
|
@@ -64,9 +64,10 @@ type ComplexityRoot struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Query struct {
|
|
|
|
|
Profile func(childComplexity int) int
|
|
|
|
|
Token func(childComplexity int) int
|
|
|
|
|
Users func(childComplexity int) int
|
|
|
|
|
Profile func(childComplexity int) int
|
|
|
|
|
Token func(childComplexity int) int
|
|
|
|
|
Users func(childComplexity int) int
|
|
|
|
|
VerificationRequests func(childComplexity int) int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Response struct {
|
|
|
|
@@ -108,6 +109,7 @@ type QueryResolver interface {
|
|
|
|
|
Users(ctx context.Context) ([]*model.User, error)
|
|
|
|
|
Token(ctx context.Context) (*model.LoginResponse, error)
|
|
|
|
|
Profile(ctx context.Context) (*model.User, error)
|
|
|
|
|
VerificationRequests(ctx context.Context) ([]*model.VerificationRequest, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type executableSchema struct {
|
|
|
|
@@ -243,6 +245,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.Users(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Query.verificationRequests":
|
|
|
|
|
if e.complexity.Query.VerificationRequests == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.VerificationRequests(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Response.message":
|
|
|
|
|
if e.complexity.Response.Message == nil {
|
|
|
|
|
break
|
|
|
|
@@ -517,6 +526,7 @@ type Query {
|
|
|
|
|
users: [User!]!
|
|
|
|
|
token: LoginResponse
|
|
|
|
|
profile: User!
|
|
|
|
|
verificationRequests: [VerificationRequest!]!
|
|
|
|
|
}
|
|
|
|
|
`, BuiltIn: false},
|
|
|
|
|
}
|
|
|
|
@@ -1145,6 +1155,41 @@ func (ec *executionContext) _Query_profile(ctx context.Context, field graphql.Co
|
|
|
|
|
return ec.marshalNUser2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query_verificationRequests(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "Query",
|
|
|
|
|
Field: field,
|
|
|
|
|
Args: nil,
|
|
|
|
|
IsMethod: true,
|
|
|
|
|
IsResolver: true,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return ec.resolvers.Query().VerificationRequests(rctx)
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.([]*model.VerificationRequest)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNVerificationRequest2ᚕᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐVerificationRequestᚄ(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
@@ -3248,6 +3293,20 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|
|
|
|
}
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
case "verificationRequests":
|
|
|
|
|
field := field
|
|
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
res = ec._Query_verificationRequests(ctx, field)
|
|
|
|
|
if res == graphql.Null {
|
|
|
|
|
atomic.AddUint32(&invalids, 1)
|
|
|
|
|
}
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
case "__type":
|
|
|
|
|
out.Values[i] = ec._Query___type(ctx, field)
|
|
|
|
|
case "__schema":
|
|
|
|
@@ -3764,6 +3823,53 @@ func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋse
|
|
|
|
|
return ec._User(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNVerificationRequest2ᚕᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐVerificationRequestᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.VerificationRequest) graphql.Marshaler {
|
|
|
|
|
ret := make(graphql.Array, len(v))
|
|
|
|
|
var wg sync.WaitGroup
|
|
|
|
|
isLen1 := len(v) == 1
|
|
|
|
|
if !isLen1 {
|
|
|
|
|
wg.Add(len(v))
|
|
|
|
|
}
|
|
|
|
|
for i := range v {
|
|
|
|
|
i := i
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Index: &i,
|
|
|
|
|
Result: &v[i],
|
|
|
|
|
}
|
|
|
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
f := func(i int) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = nil
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
if !isLen1 {
|
|
|
|
|
defer wg.Done()
|
|
|
|
|
}
|
|
|
|
|
ret[i] = ec.marshalNVerificationRequest2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐVerificationRequest(ctx, sel, v[i])
|
|
|
|
|
}
|
|
|
|
|
if isLen1 {
|
|
|
|
|
f(i)
|
|
|
|
|
} else {
|
|
|
|
|
go f(i)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
wg.Wait()
|
|
|
|
|
return ret
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNVerificationRequest2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐVerificationRequest(ctx context.Context, sel ast.SelectionSet, v *model.VerificationRequest) graphql.Marshaler {
|
|
|
|
|
if v == nil {
|
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
return ec._VerificationRequest(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalNVerifyEmailInput2githubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐVerifyEmailInput(ctx context.Context, v interface{}) (model.VerifyEmailInput, error) {
|
|
|
|
|
res, err := ec.unmarshalInputVerifyEmailInput(ctx, v)
|
|
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
|