-
Notifications
You must be signed in to change notification settings - Fork 127
Add RawValue support for non-converted Payloads #1664
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
base: main
Are you sure you want to change the base?
Conversation
I believe we need to return |
I'm really not clear how For now, I'd focus on the outbound path only, simply to support return value of built-in queries. For inbound payloads, that might have to wait only we add support for type hints on receivers. |
…l internal queries
62de924
to
cec9e55
Compare
cec9e55
to
573c2ca
Compare
I've written this in the PR description:
Let me know if this makes sense to you. |
What was changed
Added
RawValue
support for non-converted Payloads - a thin wrapper aroundPayload
.RawValue
is intended to be used for payloads that bypasses users custom payload converters in favour of the default payload converter.TS does not include type hints or similar when converting from a payload back to its original representation. As such, the best we can do is just send the payload as is and have users convert it back to its original representation.
The existing builtin queries now return a
RawValue
that wraps their former returned values. The return types of the builtin queries however, maintain their existing type (this is because receivers of these queries will get the payload itself, not theRawValue
). This is breaking change as consumers of these builtin queries will need to make sure they decode the builtin payloads correctly.Closes [Feature Request] Support "RawValue" non-converted values #1629, [Feature Request] Built-in query responses should use "RawValue" #1630
How was this tested:
Added short integration test, modified the existing built-in metadata test.
Any docs updates needed?
Possibly. Maybe for the change to the built-in metadata query.