Skip to content
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

bug: hyper returning just the doc field off of full document #546

Closed
TillaTheHun0 opened this issue Dec 15, 2022 · 0 comments · Fixed by #547
Closed

bug: hyper returning just the doc field off of full document #546

TillaTheHun0 opened this issue Dec 15, 2022 · 0 comments · Fixed by #547
Assignees
Labels
bug Something isn't working

Comments

@TillaTheHun0
Copy link
Member

TillaTheHun0 commented Dec 15, 2022

As part of #531:

Basically, to allow hyper adapters to gradually migrate to the new shape { ok: true, doc: { ... }}, I made it so hyper core pulls doc off of the response from the adapter, when "legacy get" is enabled (which it is by default right now), so that it matches the legacy behavior to just return the document, even if the adapter is returning the new shape.

The crux is that a document being fetched may actually have a doc field on it. So hyper would just extract doc from the document and return that.

{
  _id: '123.....',
  doc: { ... } // hyper was pulling this off
}

I'll need to patch hyper core to remove that adapter "backwards compatibility" magic. Basically means that adapters will have to updated in tandem with hyper core, when we make the full swap over to the new hyper shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant