INNER CODE UNIT · Python

User

The-Art-of-Hacking/websploit · additional-labs/GraphQL/app.py:36

class User(graphene.ObjectType):
    id = graphene.ID()
    username = graphene.String()
    email = graphene.String()
    api_token = graphene.String(description="The API Token for the user. Restricted access.")
    is_admin = graphene.Boolean()
    notes = graphene.String()

class SystemInfo(graphene.ObjectType):
    version = graphene.String()
    status = graphene.String()
    debug_mode = graphene.Boolean()

class Query(graphene.ObjectType):
    user = graphene.Field(User, id=graphene.ID(required=True), description="Get a user by ID")
    users = graphene.List(User, description="List all users")
    system_status = graphene.Field(SystemInfo, description="Check the system status")
    

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…