class_docstr: RedisGraph Commands
class_docstr_tok: ["RedisGraph","Commands"]
docstr: Create entire graph.
docstr_tok: ["Create","entire","graph","."]
code: def commit(self):
      """
      Create entire graph.
      """
      if len(self.nodes) == 0 and len(self.edges) == 0:
          return None
  
      query = "CREATE "
      for _, node in self.nodes.items():
          query += str(node) + ","
  
      query += ",".join([str(edge) for edge in self.edges])
  
      # Discard leading comma.
      if query[-1] == ",":
          query = query[:-1]
  
      return self.query(query)
  
file_path: catboost/contrib/python/redis/py3/redis/commands/graph/commands.py
imports: from redis import DataError
  from redis.exceptions import ResponseError
  from .exceptions import VersionMismatchException
  from .execution_plan import ExecutionPlan
  from .query_result import AsyncQueryResult, QueryResult
label_desc: Use image node_id 1 for calling the GraphCommands obj's underlying member method code with example usage: obj.commit() and returns: self, None