backend2/src/api/api_v1/endpoints/user_subscription.py
def subscribe_user_me(
    *,
    user: models.User = Depends(deps.get_current_active_user),
    db: Session = Depends(deps.get_db),
    mutation: str
) -> Any:
    """
    Add a subscription to the subscriptions
    """
    subscr = models.Subscription(user_id=user.id, mutation=mutation)
    db.add(subscr)
    try:
        db.commit()
    except exc.IntegrityError as e:
        # The mutation already subscribed (expected case)
        pass
    return mutation

    Add a subscription to the subscriptions
    
Add a subscription to the subscriptions
Add a subscription to the subscriptions
def subscribe_user_me(
    *,
    user: models.User = Depends(deps.get_current_active_user),
    db: Session = Depends(deps.get_db),
    mutation: str
) -> Any:
    subscr = models.Subscription(user_id=user.id, mutation=mutation)
    db.add(subscr)
    try:
        db.commit()
    except exc.IntegrityError as e:
        pass
    return mutation
def subscribe_user_me ( * , user : models . User = Depends ( deps . get_current_active_user ) , db : Session = Depends ( deps . get_db ) , mutation : str ) -> Any : subscr = models . Subscription ( user_id = user . id , mutation = mutation ) db . add ( subscr ) try : db . commit ( ) except exc . IntegrityError as e : pass return mutation
Add a subscription to the subscriptions
Add a subscription to the subscriptions
"""
    Add a subscription to the subscriptions
    """ # The mutation already subscribed (expected case)
user
models.User
db
Session
mutation
str