neo4j / docs-graphql

GraphQL docs
5 stars 7 forks source link

`@relationship` directive lacks information about the possible field usages , e.g. `nestedOperations` #156

Open andreloeffelmann opened 2 months ago

andreloeffelmann commented 2 months ago

The docs here does not inform the reader about the possible fields of the @relationship directive. In v4 this was solved way better, see here

Either way: it took me hours to figure out why the value CONNECT_OR_CREATE of the nestedOperations field was not working within my schema. It would be VERY HELPFUL if you pointed out in the docs, that CONNECT_OR_CREATE only affects the generated schema if the referenced type has at least one field with a @unique directive. After trial-and-erroring that out, it is quite clear why this directive is required. But it is not by simply reading the docs ;-)

Liam-Doodson commented 2 months ago

Hey @andreloeffelmann! Thanks for raising this!

Looks like we do mention this requirement in the documentation for create inputs here but seem to have missed it from the update documentation here

I do agree that a note about this requirement would also be useful here to avoid confusion