src/util/graph-util.js
function parseGraph (rdf, baseUrl, rdfSource, contentType) {
  let parsedGraph = rdf.graph()

  rdf.parse(rdfSource, parsedGraph, baseUrl, contentType)

  return parsedGraph
}
function parseGraph (rdf, baseUrl, rdfSource, contentType) {
  let parsedGraph = rdf.graph()

  rdf.parse(rdfSource, parsedGraph, baseUrl, contentType)

  return parsedGraph
}
function parseGraph ( rdf , baseUrl , rdfSource , contentType ) { let parsedGraph = rdf . graph ( ) rdf . parse ( rdfSource , parsedGraph , baseUrl , contentType ) return parsedGraph }
Parses a given graph, from text rdfSource, as a given content type.
Returns parsed graph.

@method parseGraph
@param rdf {RDF} RDF library such as rdflib.js
@param baseUrl {string}
@param rdfSource {string} Text source code
@param contentType {string} Mime Type (determines which parser to use)

@return {Graph}
Parses a given graph from text rdfSource as a given content type . Returns parsed graph .