diff --git a/modules/Bio/EnsEMBL/Hive/Utils/Graph.pm b/modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
index f6abc89d36de7876b9369a7d699cdbb49bb18af7..c8c45dacb08f3229eabc33d4a19173a942aaeae2 100644
--- a/modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
+++ b/modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
@@ -74,16 +74,17 @@ use base ('Bio::EnsEMBL::Hive::Configurable');
 =cut
 
 sub new {
-  my ($class, $hive_dba, $config_file_name) = @_;
+    my $class       = shift @_;
+    my $hive_dba    = shift @_;
 
-  my $self = bless({}, ref($class) || $class);
+    my $self = bless({}, ref($class) || $class);
 
-  $self->hive_dba($hive_dba);
-  my $config = Bio::EnsEMBL::Hive::Utils::Config->new( $config_file_name ? $config_file_name : () );
-  $self->config($config);
-  $self->context( [ 'Graph' ] );
+    $self->hive_dba($hive_dba);
+    my $config = Bio::EnsEMBL::Hive::Utils::Config->new( @_ );
+    $self->config($config);
+    $self->context( [ 'Graph' ] );
 
-  return $self;
+    return $self;
 }
 
 
diff --git a/scripts/generate_graph.pl b/scripts/generate_graph.pl
index 97485be563961e28cc3685c60d891e61cb2c034b..abf9a69c468562ef2b78bcd028e167bd699bb9fe 100755
--- a/scripts/generate_graph.pl
+++ b/scripts/generate_graph.pl
@@ -34,6 +34,9 @@ sub main {
         'reg_alias|reg_name=s'  => \$self->{'reg_alias'},
         'nosqlvc=i'             => \$self->{'nosqlvc'},     # using "=i" instead of "!" for consistency with scripts where it is a propagated option
 
+            # json config files
+        'config_file=s@'        => \$self->{'config_files'},
+
         'pipeconfig|pc=s@'      => \$self->{'pipeconfigs'}, # now an array
 
         'f|format=s'            => \$self->{'format'},
@@ -88,7 +91,10 @@ sub main {
         }
     }
 
-    my $graph = Bio::EnsEMBL::Hive::Utils::Graph->new( $self->{'dba'} );
+    my $graph = Bio::EnsEMBL::Hive::Utils::Graph->new(
+        $self->{'dba'},
+        $self->{'config_files'} ? @{ $self->{'config_files'} } : ()
+    );
     my $graphviz = $graph->build();
 
     my $call = 'as_'.$self->{'format'};