feat: add pagination for users & verification_requests
This commit is contained in:
@@ -5,6 +5,13 @@ scalar Int64
|
||||
scalar Map
|
||||
scalar Any
|
||||
|
||||
type Pagination {
|
||||
limit: Int64!
|
||||
page: Int64!
|
||||
offset: Int64!
|
||||
total: Int64!
|
||||
}
|
||||
|
||||
type Meta {
|
||||
version: String!
|
||||
is_google_login_enabled: Boolean!
|
||||
@@ -36,6 +43,11 @@ type User {
|
||||
updated_at: Int64
|
||||
}
|
||||
|
||||
type Users {
|
||||
pagination: Pagination!
|
||||
users: [User!]!
|
||||
}
|
||||
|
||||
type VerificationRequest {
|
||||
id: ID!
|
||||
identifier: String
|
||||
@@ -46,6 +58,11 @@ type VerificationRequest {
|
||||
updated_at: Int64
|
||||
}
|
||||
|
||||
type VerificationRequests {
|
||||
pagination: Pagination!
|
||||
verification_requests: [VerificationRequest!]!
|
||||
}
|
||||
|
||||
type Error {
|
||||
message: String!
|
||||
reason: String!
|
||||
@@ -235,6 +252,15 @@ input IsValidJWTQueryInput {
|
||||
roles: [String!]
|
||||
}
|
||||
|
||||
input PaginationInput {
|
||||
limit: Int64
|
||||
page: Int64
|
||||
}
|
||||
|
||||
input PaginatedInput {
|
||||
pagination: PaginationInput
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
signup(params: SignUpInput!): AuthResponse!
|
||||
login(params: LoginInput!): AuthResponse!
|
||||
@@ -260,8 +286,8 @@ type Query {
|
||||
is_valid_jwt(params: IsValidJWTQueryInput): ValidJWTResponse!
|
||||
profile: User!
|
||||
# admin only apis
|
||||
_users: [User!]!
|
||||
_verification_requests: [VerificationRequest!]!
|
||||
_users(params: PaginatedInput): Users!
|
||||
_verification_requests(params: PaginatedInput): VerificationRequests!
|
||||
_admin_session: Response!
|
||||
_env: Env!
|
||||
}
|
||||
|
Reference in New Issue
Block a user