mirror of
https://github.com/rjNemo/graphql_python_template
synced 2026-06-06 10:36:40 +00:00
12 lines
379 B
Python
12 lines
379 B
Python
from app.schema.types.user import UserListResponseField, UserResponseField
|
|
from app.usecases.user import read_all_users, read_user_by_id
|
|
|
|
|
|
def resolve_list_users(self, info):
|
|
users = read_all_users()
|
|
return UserListResponseField(users=users)
|
|
|
|
|
|
def resolve_get_user(self, info, user_id: str):
|
|
user, _ = read_user_by_id(user_id)
|
|
return UserResponseField(user=user)
|