Reputation: 1
I am trying to build and application using the example - Neo4j GraphQl Java Spring Boot Example
I have Neo4j Database in which there are various node types like Fruit, Sweet, Vegetable. I have defined their schema in neo4j.graphql file. and while running graphiql on browser, I can directly query these nodes with conditions.
For example :-
fruits{
name
quantity
}
}
This query gives me the fruit nodes with the mentioned fields. I can query the individual entities but I want to get these entities under one name/query.
I have tried defining the following in no4j.graphql
type Query {
getItems: [Item]
}
type Item{
fruits: [Fruit]
vegetables: [Vegetable]
sweets: [Sweet]
}
But this is not working.
Upvotes: 0
Views: 18