-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[GraphQL] Add a new multiGetObjects
query on Query
.
#20300
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes for the query limit checker stuff mainly!
47bb848
to
7609b6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the changes and tests related to query limits checker left, everything else is looking good here!
7609b6b
to
0dfcc3a
Compare
508e38a
to
cf236c2
Compare
cf236c2
to
b8d9fb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Can you also add some E2E tests for the happy path (not hitting the limit) before landing?
let objects = data | ||
.into_iter() | ||
.filter_map(|(lookup_key, bcs)| { | ||
Object::new_serialized( | ||
lookup_key.id, | ||
lookup_key.version, | ||
bcs, | ||
checkpoint_viewed_at, | ||
lookup_key.version, | ||
) | ||
}) | ||
.collect::<Vec<_>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let objects = data | |
.into_iter() | |
.filter_map(|(lookup_key, bcs)| { | |
Object::new_serialized( | |
lookup_key.id, | |
lookup_key.version, | |
bcs, | |
checkpoint_viewed_at, | |
lookup_key.version, | |
) | |
}) | |
.collect::<Vec<_>>(); | |
let objects: Vec<_> = data | |
.into_iter() | |
.filter_map(|(lookup_key, bcs)| { | |
Object::new_serialized( | |
lookup_key.id, | |
lookup_key.version, | |
bcs, | |
checkpoint_viewed_at, | |
lookup_key.version, | |
) | |
}) | |
.collect(); |
return Ok(None); | ||
} | ||
|
||
let keys = f.node.get_argument(MULTI_GET_OBJECT_KEYS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of this constant seems to imply that it's specific to multiGetObject
but it's not/shouldn't be -- all multiGet
s now need to use keys
as their parameter name for holding the keys.
let keys = f.node.get_argument(MULTI_GET_OBJECT_KEYS); | |
let keys = f.node.get_argument(MULTI_GET_KEYS); |
let objects = data | ||
.into_iter() | ||
.filter_map(|(lookup_key, bcs)| { | ||
Object::new_serialized( | ||
lookup_key.id, | ||
lookup_key.version, | ||
bcs, | ||
checkpoint_viewed_at, | ||
lookup_key.version, | ||
) | ||
}) | ||
.collect::<Vec<_>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let objects = data | |
.into_iter() | |
.filter_map(|(lookup_key, bcs)| { | |
Object::new_serialized( | |
lookup_key.id, | |
lookup_key.version, | |
bcs, | |
checkpoint_viewed_at, | |
lookup_key.version, | |
) | |
}) | |
.collect::<Vec<_>>(); | |
let objects: Vec<_> = data | |
.into_iter() | |
.filter_map(|(lookup_key, bcs)| { | |
Object::new_serialized( | |
lookup_key.id, | |
lookup_key.version, | |
bcs, | |
checkpoint_viewed_at, | |
lookup_key.version, | |
) | |
}) | |
.collect(); |
Description
This PR adds a new query for fetching multiple objects by their ids and versions.
Test plan
How did you test the new or updated feature?
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
multiGetObjects
top level query, which will replace the objectFilter inobjects
.