# Graph creation - Cypher Queries

Graph Algorithms v3.5 Graph Data Science v1.0

Basic Cypher queries, defining source and target:

``````CALL algo.graph.load(
'myGraph',
'MATCH (n:MyLabel)
RETURN id(n) AS id',
'MATCH (s)-[r:MY_RELATIONSHIP_TYPE]->(t)
RETURN id(s) AS source, id(t) AS target',
{
graph: 'cypher'
}
)``````
``````CALL gds.graph.create.cypher(
'myGraph',
'MATCH (n:MyLabel)
RETURN id(n) AS id',
'MATCH (s)-[r:MY_RELATIONSHIP_TYPE]->(t)
RETURN id(s) AS source, id(t) AS target'
)``````

With concurrency property and Cypher query with relationship property:

``````CALL algo.graph.load(
'myGraph',
'MATCH (n:MyLabel)
RETURN id(n) AS id',
'MATCH (s)-[r:MY_RELATIONSHIP_TYPE]->(t)
RETURN
id(s) AS source,
id(t) AS target,
r.myProperty AS weight',
{
concurrency: 4,
graph: 'cypher'
}
)``````
``````CALL gds.graph.create.cypher(
'myGraph',
'MATCH (n:MyLabel)
RETURN id(n) AS id',
'MATCH (s)-[r:MY_RELATIONSHIP_TYPE]->(t)
RETURN
id(s) AS source,
id(t) AS target,
r.myProperty AS weight',
{
}
)``````

``````CALL algo.graph.load(
'myGraph',
'MATCH (n:MyLabel)
WITH * SKIP \$skip LIMIT \$limit
RETURN id(n) AS id',
'MATCH (s)-[r:MY_RELATIONSHIP_TYPE]->(t)
WITH * SKIP \$skip LIMIT \$limit
RETURN
id(s) AS source,
id(t) AS target,
r.myProperty AS weight',
{
concurrency: 4,
graph: 'cypher'
}
)``````

-