We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f5dd54 commit c5bd447Copy full SHA for c5bd447
packages/utils/src/errors.ts
@@ -114,9 +114,12 @@ export function locatedError(
114
const error = _locatedError(rawError, nodes, path) as GraphQLError;
115
116
// `graphql` locatedError is only changing path and nodes if it is not already defined
117
- if (!error.coordinate && info) {
118
- // @ts-expect-error coordinate is readonly, but we don't want to recreate it just to add coordinate
119
- error.coordinate = `${info.parentType.name}.${info.fieldName}`;
+ if (!error.coordinate && info && error.coordinate == null) {
+ Object.defineProperty(error, 'coordinate', {
+ value: `${info.parentType.name}.${info.fieldName}`,
120
+ enumerable: true,
121
+ configurable: true,
122
+ });
123
}
124
125
return error;
0 commit comments