8000 fix: handle scalar values for lists by Noroth · Pull Request #1155 · wundergraph/graphql-go-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: handle scalar values for lists #1155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 27, 2025

Conversation

Noroth
Copy link
Contributor
@Noroth Noroth commented May 22, 2025

This pull request introduces significant updates to enhance gRPC-based GraphQL data source functionality, improve error handling, and add new features for handling recursive types and complex data structures. The changes include both core functionality updates and test enhancements.

Core Functionality Enhancements:

  • Support for Dynamic gRPC Client Provisioning: Added a new factory method NewFactoryGRPCClientProvider to allow dynamic provisioning of gRPC clients, enabling client recreation on connection errors. (v2/pkg/engine/datasource/graphql_datasource/graphql_datasource.go) [1] [2]
  • gRPC Data Source Enable/Disable Flag: Introduced a Disabled flag in the GRPCConfiguration and DataSourceConfig to allow conditional enabling or disabling of gRPC data sources. (v2/pkg/engine/datasource/grpc_datasource/configuration.go, v2/pkg/engine/datasource/grpc_datasource/grpc_datasource.go) [1] [2] [3] [4] [5]
  • Improved Error Handling: Enhanced error reporting by adding gRPC status codes to error responses. (v2/pkg/engine/datasource/grpc_datasource/grpc_datasource.go)

Recursive Type and Data Handling:

  • Recursive Type Query Simplification: Simplified the query and expected response for recursive types in test cases. (execution/engine/execution_engine_grpc_test.go)
  • Support for Null Values in Protobuf Messages: Updated the marshalResponseJSON and setArrayItem methods to handle null values in protobuf messages and lists. (v2/pkg/engine/datasource/grpc_datasource/grpc_datasource.go) [1] [2] [3]

Test and Mapping Enhancements:

  • Expanded Test Coverage: Added test cases to validate new features, such as dynamic gRPC client provisioning and handling of nested data structures with modifiers. (v2/pkg/engine/datasource/grpc_datasource_test.go) [1] [2] [3] [4]
  • Extended Mock Service and Mapping: Updated the mock gRPC service and default mappings to include new fields like orderLines and modifiers. (v2/pkg/grpctest/mapping/mapping.go, v2/pkg/grpctest/mockservice.go, v2/pkg/grpctest/product.proto) [1] [2] [3]

@Noroth Noroth marked this pull request as ready for review May 22, 2025 14:19
@Noroth Noroth force-pushed the ludwig/eng-7195-fix-scalar-values-for-lists branch from 575c65c to d62f2a1 Compare May 26, 2025 07:21
@Noroth Noroth merged commit 94031e5 into master May 27, 2025
10 checks passed
@Noroth Noroth deleted the ludwig/eng-7195-fix-scalar-values-for-lists branch May 27, 2025 09:48
Noroth pushed a commit that referenced this pull request May 27, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.0.0-rc.182](v2.0.0-rc.181...v2.0.0-rc.182)
(2025-05-27)


### Bug Fixes

* handle scalar values for lists
([#1155](#1155))
([94031e5](94031e5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
devsergiy pushed a commit that referenced this pull request Jun 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](execution/v1.2.0...execution/v1.3.0)
(2025-06-05)


### Features

* add apollo router compat flag for invalid variable rendering
([#1067](#1067))
([e87961f](e87961f))
* add deprecated arguments support to introspection
([#1142](#1142))
([1ac2908](1ac2908))
* apollo-router-like non-ok http status errors
([#1072](#1072))
([e685c29](e685c29))
* differentiate between complete and close event types
([#1158](#1158))
([79f3f41](79f3f41))
* **engine:** mutex free subscription handling
([#1076](#1076))
([21be4ab](21be4ab))
* implement gRPC datasource
([#1146](#1146))
([146a552](146a552))
* update engine version for execution pkg
([#1171](#1171))
([9769beb](9769beb))


### Bug Fixes

* fix printing object value with optional fields
([#1065](#1065))
([5730d72](5730d72))
* handle scalar values for lists
([#1155](#1155))
79E7

([94031e5](94031e5))
* interface objects
([#1055](#1055))
([858d929](858d929))
* print indent once per level by default
([#1147](#1147))
([0f022e5](0f022e5)),
closes
[#405](#405)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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
0