Creating a Driver Instance

Your challenge is to add a new Driver instance to an existing file with the connection details provided. Once you have created the Driver, you must open a new session and run a Cypher statement to find the director of Toy Story.

Open Challenge in an Online IDE →


  1. Install the Neo4j JavaScript Driver in the integrated terminal window

  2. Use the neo4j object to create a new instance of the Driver with the credentials provided:

    • NEO4J_URI is the connection string

    • NEO4J_USERNAME and NEO4J_PASSWORD should be used to create the authentication token.

  3. Once you have created the Driver, open a new session and run the following query:

    Find the Director
    Unresolved directive in lesson.adoc - include::[]

    The statement requires the following parameters:

    { title: 'Toy Story' }
  4. To find the answer, click the Debug icon to the left of the window and run Create Driver Challenge task, or use the integrated terminal window to run the following command:

    Run The Challenge
    ts-node src/challenges/create-driver/challenge.ts
  5. Once you have the result, copy and paste it into the text box below and click Check Answer.

View the Solution
Unresolved directive in lesson.adoc - include::[]

Your Answer

Who directed Toy Story?

Take the Director value output from the statement above and paste it into the box below.

  • ✓ John Lasseter


You need to call the neo4j.driver() object to create a Driver instance using the NEO4J_URI, NEO4J_USERNAME and NEO4J_PASSWORD variables, then open a new session, execute the Cypher statement and log the Director value of the first record.

Your console.log() statement should look similar to the code block below:


Copy the answer without any quotes or whitespace.


John Lasseter directed Toy Story.

Compare your code with the solution here

Unresolved directive in questions/1-director.adoc - include::[]

Click here to view the solution.

Lesson Summary

In this challenge, you used your knowledge to create a driver instance and run a Cypher statement.

In the next lesson, you will learn about the different transaction functions and when to use them.


Hi, I am an Educational Learning Assistant for Intelligent Network Exploration. You can call me E.L.A.I.N.E.

How can I help you today?