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

Reimplement field merging #498

Merged
merged 11 commits into from
Feb 27, 2024
Merged

Reimplement field merging #498

merged 11 commits into from
Feb 27, 2024

Conversation

imor
Copy link
Contributor

@imor imor commented Feb 26, 2024

What kind of change does this PR introduce?

Feature

What is the current behavior?

Field merging doesn't work because it was reverted recently.

What is the new behavior?

Fields at the same level will be merged according to the GraphQL spec. The new algo is O(n) in the total number of fields and is much faster than the old algo. Tests from the old algo are also included with more added to cover additional cases.

Additional context

N/A

@imor imor marked this pull request as ready for review February 26, 2024 11:41
src/merge.rs Outdated Show resolved Hide resolved
Also changed the comparison algorithm to O(n + m) from O(nm)
@olirice olirice merged commit add26e7 into master Feb 27, 2024
4 checks passed
@olirice olirice deleted the merge_fields_new branch February 27, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants