[server] add ability to get user by email
This commit is contained in:
@@ -2630,7 +2630,8 @@ input ResendOTPRequest {
|
||||
}
|
||||
|
||||
input GetUserRequest {
|
||||
id: String!
|
||||
id: String
|
||||
email: String
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
@@ -15369,7 +15370,7 @@ func (ec *executionContext) unmarshalInputGetUserRequest(ctx context.Context, ob
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"id"}
|
||||
fieldsInOrder := [...]string{"id", "email"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -15380,7 +15381,15 @@ func (ec *executionContext) unmarshalInputGetUserRequest(ctx context.Context, ob
|
||||
var err error
|
||||
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
||||
it.ID, err = ec.unmarshalNString2string(ctx, v)
|
||||
it.ID, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
case "email":
|
||||
var err error
|
||||
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email"))
|
||||
it.Email, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
|
@@ -144,7 +144,8 @@ type GenerateJWTKeysResponse struct {
|
||||
}
|
||||
|
||||
type GetUserRequest struct {
|
||||
ID string `json:"id"`
|
||||
ID *string `json:"id"`
|
||||
Email *string `json:"email"`
|
||||
}
|
||||
|
||||
type InviteMemberInput struct {
|
||||
|
@@ -537,7 +537,8 @@ input ResendOTPRequest {
|
||||
}
|
||||
|
||||
input GetUserRequest {
|
||||
id: String!
|
||||
id: String
|
||||
email: String
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
|
Reference in New Issue
Block a user