Skip to content

Improve error message for invalid variables #7567

Merged
SimonSapin merged 6 commits intodevfrom
simon/ROUTER-1292
Jun 3, 2025
Merged

Improve error message for invalid variables #7567
SimonSapin merged 6 commits intodevfrom
simon/ROUTER-1292

Conversation

@SimonSapin
Copy link
Contributor

@SimonSapin SimonSapin commented May 26, 2025

Example:

-invalid type for variable: 'x'
+invalid input value at `x.coordinates[0].longitude`: found JSON null for GraphQL type `Float!`

Fixes #2984


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Tests added and passing3
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@SimonSapin SimonSapin requested a review from a team May 26, 2025 20:17
@github-actions

This comment has been minimized.

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented May 26, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 6 changed, 0 removed
* graphos/routing/(latest)/configuration/yaml.mdx
* graphos/routing/(latest)/customization/custom-binary.mdx
* graphos/routing/(latest)/operations/subscriptions/configuration.mdx
* graphos/routing/(latest)/performance/caching/distributed.mdx
* graphos/routing/(latest)/performance/caching/in-memory.mdx
* graphos/routing/(latest)/security/demand-control.mdx

Build ID: 8ef7510857f9c065b3f56db6

URL: https://www.apollographql.com/docs/deploy-preview/8ef7510857f9c065b3f56db6

@SimonSapin SimonSapin requested a review from a team as a code owner May 26, 2025 20:19
Comment on lines +120 to +121
// FIXME(SimonSapin): this causes every Rust field to be included in `extensions`,
// do we really want that?
Copy link
Member

Choose a reason for hiding this comment

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

... what? that's wild. i want to say no? but maybe the original author of this snippet had something in mind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it was a convenient shortcut that happened to have the desired effect for all variants the existed at the time, but it silently applied when new variants/fields were added

Copy link
Member

@lrlna lrlna left a comment

Choose a reason for hiding this comment

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

Thank you, @SimonSapin!

Co-authored-by: Renée <renee.kooi@apollographql.com>
@SimonSapin SimonSapin enabled auto-merge (squash) June 3, 2025 13:18
@SimonSapin SimonSapin merged commit d7b6209 into dev Jun 3, 2025
15 checks passed
@SimonSapin SimonSapin deleted the simon/ROUTER-1292 branch June 3, 2025 13:37
@abernix abernix mentioned this pull request Jul 1, 2025
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.

Input validation errors to match gateway

4 participants