feat(server): add is_valid_jwt query

This commit is contained in:
Lakhan Samani
2022-01-24 00:32:06 +05:30
parent 7f18a3f634
commit 87b1cac979
10 changed files with 465 additions and 52 deletions

View File

@@ -62,6 +62,11 @@ type Response {
message: String!
}
type ValidJWTResponse {
valid: Boolean!
message: String!
}
type Env {
ADMIN_SECRET: String
SMTP_HOST: String
@@ -215,6 +220,15 @@ input MagicLinkLoginInput {
roles: [String!]
}
input SessionQueryInput {
roles: [String!]
}
input IsValidJWTQueryInput {
jwt: String!
roles: [String!]
}
type Mutation {
signup(params: SignUpInput!): AuthResponse!
login(params: LoginInput!): AuthResponse!
@@ -236,7 +250,8 @@ type Mutation {
type Query {
meta: Meta!
session(roles: [String!]): AuthResponse!
session(params: SessionQueryInput): AuthResponse!
is_valid_jwt(params: IsValidJWTQueryInput): ValidJWTResponse!
profile: User!
# admin only apis
_users: [User!]!