Skip to content

Conversation

rgaignault
Copy link
Contributor

@rgaignault rgaignault commented Oct 1, 2025

Add new properties for the following support for graphql response tracking.

Note : The code property is not native but taken from the extension field and move at the top level. As we would like to query directly : @resource.[…].errors.code:xxx. It is present in the spec as a field in the extension part, so it could be manually added by the customers but also some libraries such as Apollo directly provide it in the response. (see Documentation)

See the spec for more informations about the graphql response format : GraphQL Spec

@rgaignault rgaignault requested review from a team as code owners October 1, 2025 13:23
},
"code": {
"type": "string",
"description": "Error code from GraphQL extensions",
Copy link
Contributor

Choose a reason for hiding this comment

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

💬 suggestion: IMO, mentioning GraphQL extensions can be a bit confusing here because it requires to be aware of this concept of the GraphQL spec, and it could easily be misunderstood with the extension concept we have at SDK level.

I think we could:

  • Not mention it at all, "Error code"
  • Not mention GraphQL extension, "Error code (used by some providers)"

Copy link
Contributor Author

@rgaignault rgaignault Oct 14, 2025

Choose a reason for hiding this comment

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

Sounds good ! I would prefer the second one as it is not always present. (to inform customers why it's not there)

bcaudan
bcaudan previously approved these changes Oct 14, 2025
Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@barboraplasovska barboraplasovska left a comment

Choose a reason for hiding this comment

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

LGTM

@satween satween self-requested a review October 15, 2025 13:57
@rgaignault rgaignault merged commit fe2d362 into master Oct 15, 2025
9 checks passed
@rgaignault rgaignault deleted the romanG/graphql-error-tracking-schema branch October 15, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants