Validating a neo4j database against a graphQL schema

124 Views Asked by At

During development & prototyping (and I guess in the long term), the GraphQL schema can undergo lots of changes including removing/renaming nodes, relationships, properties etc.. These old items persist in the neo4j database, and the database does not adhere to the schema anymore (not for existing items prior to the schema change).

My question is: How can I periodically (or at server initialization) check the existing neo4j db entries against my GraphQL schema and identify items that are not adhering to it? I feel that this would be beneficial even if you have 2 db's for dev and prod?

I am using neo4j-graphql-js and not the internal GraphQL (via plugin).

I understand that neo4j (and other NoSQL databases for that matter) are schema-less. I also see that apollo allows you to monitor schema changes, but checks against clients not the database itself.

0

There are 0 best solutions below