Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-13-2022 07:45 AM
I want to use Neo4jGraphQL
library and have one existing Neo4J database. Is there a way to generate typeDefs
out of the box using using some tool or some mean?
const { Neo4jGraphQL } = require("@neo4j/graphql");
const neo4j = require("neo4j-driver");
const typeDefs = gql`
type User {
username: String
orders: [Order!]! @relationship(type: "PLACED", direction: OUT)
}
Solved! Go to Solution.
02-14-2022 04:37 AM
The older neo4j-graphql-js had an automatic schema generation feature, but it hasn't been included in @neo4j/graphql yet.
In the meantime, what you can do in your Neo4j instance is run these two queries:
CALL apoc.meta.nodeTypeProperties();
CALL apoc.meta.relTypeProperties();
These will give you complete reports of all of the metadata in the database. It isn't a GraphQL set of typedefs, but you can translate it into typedefs. (This is how the feature in neo4j-graphql-js worked)
02-14-2022 04:37 AM
The older neo4j-graphql-js had an automatic schema generation feature, but it hasn't been included in @neo4j/graphql yet.
In the meantime, what you can do in your Neo4j instance is run these two queries:
CALL apoc.meta.nodeTypeProperties();
CALL apoc.meta.relTypeProperties();
These will give you complete reports of all of the metadata in the database. It isn't a GraphQL set of typedefs, but you can translate it into typedefs. (This is how the feature in neo4j-graphql-js worked)
02-14-2022 09:25 PM
Thank you very much David.
All the sessions of the conference are now available online