这是indexloc提供的服务,不要输入任何密码
Skip to content

prevent response serialization from assuming objects are relations #34

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 4 commits into from
Apr 12, 2024

Conversation

hallettj
Copy link
Collaborator

@hallettj hallettj commented Apr 12, 2024

The change in #27 fixed serializing query responses with object values, but serializing foreach responses stopped working. This PR switches back to roughly the logic in which foreach responses were working, and fixes the issue with object values in a different way.

This is a quick patch - we still need to rework response serialization to use bson_to_json translation. That will require using the query request to direct response serialization which should make everything more robust.

I removed the use of JsonResponse in this PR because it serves no purpose for this connector. JsonResponse is useful for connectors that get a JSON response from the database, which the connector can pass through without processing. But as far as we can determine MongoDB always sends BSON so to get JSON output we're stuck doing response processing in the connector.

Fixes https://hasurahq.atlassian.net/browse/MDB-19

@hallettj hallettj merged commit 4274be1 into main Apr 12, 2024
@hallettj hallettj deleted the jesse/fix-query-response-for-foreach branch April 12, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants