Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-18-2019 07:51 PM
Have been trying to follow the Grandstack Movie example schema definitions and apply it to my project, but keep running into an error when I am using the following:
countBySubstring(substring: String): Int!
@cypher(
statement: "MATCH (c:Company) WHERE c.Name CONTAINS $substring RETURN COUNT(c)"
)
Is this approach not possible at the moment. Seems in GraphQL I should be able to simply return an integer representing the count of my label. Am I missing something in the schema def?
Thanks in advance.
02-19-2019 06:45 AM
I've run into some similar issues. @William_Lyon responded to this thread with some helpful examples. Neo4j-grapql-js custom cypher query but mostly, the augmented schema isn't set up to return a scalar just objects.
02-19-2019 07:12 AM
Ah, that's what I thought, maybe it's coming sometime in the future. Thanks for clarifying, appreciate it.
02-19-2019 07:51 AM
We’ve got a fix for this merged in now, it will land in the next release (later today): https://github.com/neo4j-graphql/neo4j-graphql-js/issues/145
All the sessions of the conference are now available online