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

Resolvers performance improvements #660

Open
ntarocco opened this issue Dec 15, 2019 · 0 comments
Open

Resolvers performance improvements #660

ntarocco opened this issue Dec 15, 2019 · 0 comments

Comments

@ntarocco
Copy link
Contributor

Currently we have implemented resolvers URLs that contain the current record pid, e.g.

`internal_location`: {
    ...
    location_pid: 1,
    location: {
        $ref: ".../resolver/internal_location/<intloc>/location"
    }
}

and then, in the resolver implementation, we first fetch the intloc by <intloc> and then fetch the location 1.
We could optimize this given that now we "control" the $ref when we create/update records by also adding the location pid.

  1. ensure that on create/update we completely ignore any user input for the location field and instaed we re-create the $ref from the field location: ABC, e.g. $ref: ".../resolver/internal_location/<intloc>/location/ABC"
  2. change the refs URLs and add the referenced record pid, whenever possible and makes sense.

Having both current record and referenced record in the resolver implementation function is far more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants