tailcall icon indicating copy to clipboard operation
tailcall copied to clipboard

Tracing on type level should not contain field name

Open wesleymatosdev opened this issue 1 year ago • 2 comments

Prerequisites

  • [x] I have checked the existing issues to ensure this is not a duplicate.
  • [x] I am running the latest version of Tailcall.

Describe the bug

Currently, we use to_field which is responsible for translating a field config into the blueprint equivalent. The issue is that on src/blueprint/definitions:421 we add a .trace(name) to the Valid instance where to_field is applied. Somehow, we should track whether the validation error is part of the field or not. One clear example of where it shouldn't be is stated in this comment, but we have no way to differentiate between errors that are on field on or the type now. All errors will be traceable with the field name, which is now always the ideal.

Expected behavior

Only errors that were actually on the field should have the field name on its trace.

Actual behavior

All failing have the field name, independently if it's the main type or not.

wesleymatosdev avatar Mar 29 '24 18:03 wesleymatosdev

Can you provide an example @ologbonowiwi so that it's easier to understand what actually happens vs expectations.

tusharmath avatar Apr 10 '24 12:04 tusharmath

Action required: Issue inactive for 30 days. Status update or closure in 7 days.

github-actions[bot] avatar May 10 '24 13:05 github-actions[bot]

Issue closed after 7 days of inactivity.

github-actions[bot] avatar May 17 '24 14:05 github-actions[bot]