Example #1
0
 def mutate(self, info, node_id):
     exact_node = db_session.query(StructureModel).filter(
         StructureModel.id == node_id).first()
     if not exact_node:
         raise GraphQLError("The specified node does not exist")
     db_session.delete(exact_node)
     db_session.commit()
     return DeleteNode(node=exact_node)
Example #2
0
 def delete(self):
     """Function for deleting objects"""
     db_session.delete(self)
     db_session.commit()
Example #3
0
 def delete(self):
     """Function that deletes objects"""
     db_session.delete(self)
     db_session.commit()