1.5 Adding Permissions to Publish the Graph

There are two ways by which you can view any graph in your graph server (PGX) session in the graph visualization application.

When you log into the graph visualization tool in your browser, that will be a different session from your JShell session or application session. To visualize the graph you are working on in your JShell session or application session in your graph visualization session, you can perform one of the following two steps:

  1. Get the session id of your working session using the PgxSession API, and use that session id when you log into the graph visualization application. This is the recommended option.
    opg4j> session.getId();
    $2 ==> "898bdbc3-af80-49b7-9a5e-10ace6c9071c"  //session id
    

    or

  2. Grant PGX_SESSION_ADD_PUBLISHED_GRAPH permission and then publish the graph as shown:
    1. Grant PGX_SESSION_ADD_PUBLISHED_GRAPH role in the database to the user visualizing the graph as shown in the following statement:
      GRANT PGX_SESSION_ADD_PUBLISHED_GRAPH TO <graphuser>
    2. Publish the graph when you are ready to visualize the graph using the publish API.

    Note: