cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Speed differences between Cypher and Neo4jGraphQL

Hi all,
I am building a react app using Neo4jGraphQL and AuraDB. I have a simple query where I want to return all the nodes of a given type.

In cypher the query is 

 

match (n: Champion) return n

 

Using Apollo GraphQL, the query becomes

 

type Query{
    allChampions:[Champion] @cypher(statement:"""
        match (n: Champion) return n
    """)
}
const GET_ALL_CHAMPIONS = gql`
  query explore {
    allChampions {
      id
      name
      imageSrc
    }
  }
`;

 

The cypher query is very quick using the neo4j auradb browser:

Started streaming 59 records after 1 ms and completed after 4 ms.

However the same query takes ~3 seconds for the apollo server (See attatched image.)
 
Is there anyway to speed up the time it takes apollo graphql? Cypher is so much faster in the neo4j aura db browser!

 

2 REPLIES 2

Screenshot 2023-01-19 at 11.43.52.png

Looks to be related to this? 
Any advice here?

https://github.com/neo4j/graphql/issues/1643