keystonejs / keystone

The superpowered headless CMS for Node.js — built with GraphQL and React
https://keystonejs.com
MIT License
9.18k stars 1.15k forks source link

Reduce relationship error verbosity #9042

Closed dcousens closed 7 months ago

dcousens commented 7 months ago

The scenario where an invalid 3-way relationship is defined, the error presented is quite verbose:

Foo.bar points to Abc.def, Abc.def points to Foo, expected Abc.def to point to Foo.bar

This pull request changes that error to be equivalent to the following, which is aligned with each of the other relationship errors in structure of {context}, but {problem}.

Foo.bar expects Abc.def to be a two way relationship, but Abc.def points to Foo.bazzz

codesandbox-ci[bot] commented 7 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5becdc73b662e4c9af59e7acb5ba22a27802461e:

Sandbox Source
@keystone-6/sandbox Configuration