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!