Added auth
This commit is contained in:
13
api/schema/definitions/user.py
Normal file
13
api/schema/definitions/user.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import strawberry
|
||||
|
||||
from api.models import UserModel
|
||||
|
||||
|
||||
@strawberry.type
|
||||
class User:
|
||||
id: int
|
||||
name: str
|
||||
|
||||
@classmethod
|
||||
def from_instance(cls, instance: UserModel):
|
||||
return cls(id=instance.id, name=instance.name)
|
||||
Reference in New Issue
Block a user