Skip to content

chore: upgrade GraphQL builder from 1.x to 2.x - #694

Merged
vsseixaso merged 3 commits into
masterfrom
chore/upgrade-graphql-builder-2x
May 7, 2026
Merged

chore: upgrade GraphQL builder from 1.x to 2.x#694
vsseixaso merged 3 commits into
masterfrom
chore/upgrade-graphql-builder-2x

Conversation

@vsseixaso

Copy link
Copy Markdown
Contributor

What problem is this solving?

Builder 2.x requires @auth on every query and mutation. The previous upgrade attempt (#687) was reverted in #690 due to strict variable coercion errors — not because of this requirement. That root cause was fixed by the @coerce directive in #692, so the upgrade is safe to land now.

What changed?

  • manifest.json: "graphql": "1.x""graphql": "2.x"
  • graphql/schema.graphql: @auth(scope: PUBLIC) added to all queries and mutations; scalar Upload declaration added

All fields use scope: PUBLIC, preserving the same public-by-default behaviour as 1.x.

How to test it?

Run ./test-errors-regression.sh against a linked workspace — all 14 regression cases should pass.

Related

Re-introduces the GraphQL builder portion of #687.
Depends on the coercion fix from #692.

Made with Cursor

Made with Cursor

vsseixaso and others added 2 commits May 7, 2026 15:14
The @Coerce schema directive (PR #692) now handles all known type-mismatch
patterns (quantity/seller Int→String, category id String→Int, geoCoordinates
Float→String) surgically at the field level. The strict coercion introduced
by graphql@2.x is therefore safe — all 35 @Coerce unit tests pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ilder 2.x

GraphQL builder 2.x requires the @auth directive on every query and
mutation. All fields are marked with @auth(scope: PUBLIC) to preserve
the same behaviour as 1.x, where queries without @auth were public by
default.

Also adds `scalar Upload` declaration required by the 2.x builder.

All 864 unit tests pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vsseixaso
vsseixaso requested a review from a team as a code owner May 7, 2026 18:36
@vsseixaso
vsseixaso requested review from RodrigoTadeuF, gabpaladino and mendescamara and removed request for a team May 7, 2026 18:36
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot

vtex-io-docs-bot Bot commented May 7, 2026

Copy link
Copy Markdown

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

mendescamara
mendescamara previously approved these changes May 7, 2026

@mendescamara mendescamara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Co-authored-by: Cursor <cursoragent@cursor.com>
@vsseixaso
vsseixaso merged commit 5175abe into master May 7, 2026
9 of 10 checks passed
@vsseixaso
vsseixaso deleted the chore/upgrade-graphql-builder-2x branch May 7, 2026 20:22
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Your PR has been merged! App is being published. 🚀
Version 2.176.0 → 2.177.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.store-graphql@2.177.0

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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.

2 participants