feat: allow empty arguments for field resolvers#1350
Merged
Conversation
Contributor
WalkthroughRefactors field resolution in gRPC datasource processing from fieldRef-based to fieldDefRef-based (field definition references) throughout execution plan construction and visitor logic. Adds strict validation for field definitions with error handling, conditional argument allocation in resolver RPC calls, and corresponding test coverage for optional resolver arguments. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Areas requiring extra attention:
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Contributor
|
started review |
ysmolski
approved these changes
Dec 8, 2025
devsergiy
approved these changes
Dec 8, 2025
Noroth
pushed a commit
that referenced
this pull request
Dec 8, 2025
🤖 I have created a release *beep* *boop* --- ## [2.0.0-rc.240](v2.0.0-rc.239...v2.0.0-rc.240) (2025-12-08) ### Features * add composite type support for field resolvers ([#1341](#1341)) ([701ea8d](701ea8d)) * allow empty arguments for field resolvers ([#1350](#1350)) ([5db8c5a](5db8c5a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for composite types in field resolvers * Added support for empty arguments in field resolvers <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
3 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduction
This PR introduces support to call field resolvers without any arguments. Currently we only check if field resolvers provide arguments with parentheses.
Field resolvers were determined whether fields have arguments. This is technically correct but instead of checking field arguments on the operation side, they have to be determined from the schema definition.
Prerequisites
The following problem statement refer to this example schema
Problem Statement
This will correctly call the field resolver
This did not call the field resolver
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.
Checklist