mirror of
https://github.com/rjNemo/graphql_python_template
synced 2026-06-06 02:26:47 +00:00
11 lines
271 B
Python
11 lines
271 B
Python
from typing import Tuple
|
|
|
|
from app.models.todo import Todo
|
|
from app.repositories.todos import get_todo_by_id
|
|
|
|
|
|
def read_todo_by_id(todo_id: str) -> Tuple[Todo, bool]:
|
|
try:
|
|
return get_todo_by_id(todo_id), True
|
|
except IndexError:
|
|
return None, False
|