Skip to content

Proposal: Faster Algorithm For OverlappingFieldsCanBeMerged #2185

Open
@acceleratesage

Description

@acceleratesage

At XING we are using the Sangria implementation of GraphQL. The implementation of the OverlappingFieldsCanBeMerged validation in Sangria follows the one in this reference implementation. We experienced performance problems with it related to the number of fragments. After we invested some time to solve it, I came up with a better algorithm, that we are using now.

  • Here is the description of the algorithm.
  • And here is our PR for Sangria.

The proposal would be to use this algorithm in the reference implementation. Below is an example benchmark graph showing the performance improvement for multiple fragments in the same selection set.

2019-09-16 NoOverlapFrag

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions