@clicktap/ui 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/migrations/2026/09/ui-2026-09-09-graphql-field-errors-reported-in-production.md
CHANGED
|
@@ -67,9 +67,33 @@ body is a candidate for holding a secret; anything derived from the *response er
|
|
|
67
67
|
|
|
68
68
|
## Consumer Impact
|
|
69
69
|
|
|
70
|
-
**Nothing to change
|
|
71
|
-
returned exactly as before — reporting the error
|
|
72
|
-
deliberately allowed to render around one failed
|
|
70
|
+
**Nothing to change — *if* you call this package's `graphqlRequest()`.** No API moved, no
|
|
71
|
+
signature changed, and partial data is still returned exactly as before — reporting the error
|
|
72
|
+
does not start tearing down a UI that was deliberately allowed to render around one failed
|
|
73
|
+
field.
|
|
74
|
+
|
|
75
|
+
🚨 **If you have your OWN GraphQL client, this is not "nothing to change".** A client modeled
|
|
76
|
+
on `createAuthAwareGraphqlClient` inherited the *behavior* being fixed here with no way to
|
|
77
|
+
inherit the *fix*. Check whether yours reads `errors[]` on the partial-response path at all:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
// the shape to look for — `errors` parsed, then dropped
|
|
81
|
+
if (payload.data != null) {
|
|
82
|
+
return { data: payload.data, transportError: false, retryable: false };
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
⚠️ **A fork can be worse off than this package was.** Upstream at least gated `logFieldErrors`
|
|
87
|
+
to `NODE_ENV === 'development'`, so errors were recorded in dev. A re-implementation that never
|
|
88
|
+
logged at all discards them in **every** environment — and because a partial response is HTTP
|
|
89
|
+
200, nothing else notices: no retry, no `unauthenticated`/`serverError` dispatch, no error rate
|
|
90
|
+
to move. Measured in one consumer: `grep -n 'console\.\|NODE_ENV'` on their client returned
|
|
91
|
+
nothing, so there was no logging to gate.
|
|
92
|
+
|
|
93
|
+
🚨 **If you are porting the fix, port the `variables` rule with it.** Logging the whole request
|
|
94
|
+
is the obvious way to make the log useful and it is how credentials reach your logs — see
|
|
95
|
+
*"Production deliberately logs less, and the difference is `variables`"* above. It is the
|
|
96
|
+
single thing a re-implementer is most likely to get wrong.
|
|
73
97
|
|
|
74
98
|
What you will notice:
|
|
75
99
|
|