crystal
crystal copied to clipboard
Since the rewrite from depth-first to breadth-first planning errors aren't field-local
Planning errors now bubble to the operation root; for example if you return a PgUnionAllSingleStep in a list position that's expecting a PgSelectSingleStep the entire operation gets rejected.
We might be able to solve this by moving to the generator/yield pattern to enable catching errors in nested positions at higher levels whilst still allowing the code to be breadth first
See commit d9d33c776be0d9ac64e4266a0be987a93d6a2b29 with UPDATE_SNAPSHOTS=1 yarn jest __tests__/queries/refs/books-related-people-plural-ref.test.graphql
This is no longer the case; I just checked via
{
errorTests {
nested {
nestedList {
nested {
planningError
}
}
}
}
}
against
https://github.com/graphile/crystal/blob/41a87eae4605f7ee19c3b10c21419177f10875d4/postgraphile/postgraphile/graphile.config.ts#L527-L546