Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0f65692
chore(release): update monorepo packages versions (#6826)
theguild-bot Jan 6, 2025
33e8b5d
Bump webpack from 5.99.1 to 5.99.2 in the actions-deps group (#7101)
dependabot[bot] Apr 8, 2025
bf72aff
chore(deps): update dependency svelte to v5.25.9 (#7108)
renovate[bot] Apr 8, 2025
dba7f2a
build(deps): bump next from 15.4.2 to 15.4.3 (#7317)
dependabot[bot] Jul 24, 2025
c7d8570
feat(executor): add schema coordinates extension to graphql errors
EmrysMyrddin Oct 14, 2025
0f67a7b
make error coordinate schema extension opt-in and non-serializable
EmrysMyrddin Oct 16, 2025
91a9a5e
fix import
EmrysMyrddin Oct 27, 2025
cafb417
remove `null` for nodes
EmrysMyrddin Oct 27, 2025
7922d3f
fix
EmrysMyrddin Oct 27, 2025
ce2817a
add changeset
EmrysMyrddin Oct 27, 2025
6bc6c4f
try fix CI snapshot message
EmrysMyrddin Oct 27, 2025
e38dabd
export getter
EmrysMyrddin Oct 27, 2025
fb45070
fix example
EmrysMyrddin Oct 27, 2025
0fe02b7
update tests
EmrysMyrddin Oct 28, 2025
bfe3e42
remove version guards in tests
EmrysMyrddin Oct 28, 2025
37d8ddf
fix tests for Bun
EmrysMyrddin Oct 31, 2025
751f280
use `coordinate` instead of extensions
EmrysMyrddin Nov 10, 2025
7c9f1fc
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Nov 10, 2025
5663c9b
do not care about graphql 15
EmrysMyrddin Nov 10, 2025
748556a
update changeset
EmrysMyrddin Nov 10, 2025
0fbfc4d
do not use class
EmrysMyrddin Nov 13, 2025
b9286d7
add executor tests for error coordinates
EmrysMyrddin Nov 13, 2025
cd259c9
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Nov 13, 2025
1d4c7bf
fix JSON stringify
EmrysMyrddin Nov 13, 2025
50334a2
do not override existing coordinate
EmrysMyrddin Nov 14, 2025
9882723
use define property and guard against existing coordinate
EmrysMyrddin Nov 14, 2025
eae3c31
also override toJSON in locatedError
EmrysMyrddin Nov 14, 2025
1629d64
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Nov 14, 2025
d10ee4a
update changeset
EmrysMyrddin Nov 14, 2025
2b67fa6
fix test
EmrysMyrddin Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .changeset/floppy-women-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
'@graphql-tools/executor': minor
'@graphql-tools/utils': minor
---

Add optional schema coordinate in error extensions. This extension allows to precisely identify the
source of the error by automated tools like tracing or monitoring.

This new feature is opt-in, you have to enable it using `schemaCoordinateInErrors` executor option.

**Caution:** This feature, when enabled, will expose information about your schema. If you need to
keep you schema private and secret, you should strip this attribute at serialization time before
sending errors to the client.

```ts
import { parse } from 'graphql'
import { normalizedExecutor } from '@graphql-tools/executor'
import schema from './schema'

// You can also use `Symbol.for('graphql.error.schemaCoordinate')` to get the symbol if you don't
// want to depend on `@graphql-tools/utils`

const result = await normalizedExecutor({
schema,
document: parse(gql`...`),
schemaCoordinateInErrors: true // enable adding schema coordinate to graphql errors
})

if (result.errors) {
for (const error of result.errors) {
console.log('Error in resolver ', error.coordinate, ':', error.message)
}
}
Comment on lines +6 to +33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Polish changeset wording and example

A few small doc fixes will make this clearer:

  • Line 12: change “keep you schema private and secret” → “keep your schema private and secret”.
  • The comment about Symbol.for('graphql.error.schemaCoordinate') suggests a symbol-based API, while the current example and implementation expose error.coordinate directly; clarifying how/if the symbol is actually used would avoid confusion.
  • Optional: the snippet uses parse(gql\...`)without importinggql; either add the import or switch to a plain string literal in parse` so the example is self-contained.
🧰 Tools
🪛 LanguageTool

[grammar] ~12-~12: Ensure spelling is correct
Context: ... about your schema. If you need to keep you schema private and secret, you should s...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

```
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
permissions:
contents: read
id-token: write
pull-requests: write
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@v1
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
with:
Expand Down
46 changes: 2 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading