graphql icon indicating copy to clipboard operation
graphql copied to clipboard

Documentation Error handling

Open AccsoSG opened this issue 2 years ago • 1 comments

I searched the documentation for which erros are currently being thrown by neo4j/graphql, and under what circumstances. Unfortunately, there is currently no documentation for this.

I found the following errors in the code:

Neo4jGraphQLError

  • Neo4jGraphQLForbiddenError
  • Neo4jGraphQLAuthenticationError
  • Neo4jGraphQLConstraintValidationError
  • Neo4jGraphQLCypherBuilderError
  • Neo4jGraphQLRelationshipValidationError

Most of these are actually self-explanatory, but what is the Neo4jGraphQLRelationshipValidationError for, for example?. Under what circumstances is this error triggered? How should this error be handled?

AccsoSG avatar Sep 22 '22 13:09 AccsoSG

Hi @AccsoSG , This is valuable feedback, thank you for opening it, We recognize that our documentation and our error messages are far from perfect, and for this reason, we have planned to do some work around it. For the specific case of Neo4jGraphQLRelationshipValidationError, this happens when the cardinality of a relationship described in the GraphQL Schema differs from the related cardinality present in the Neo4j instance.

MacondoExpress avatar Sep 22 '22 14:09 MacondoExpress