question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimize OverlappingFieldsCanBeMerged

See original GitHub issue

QueryReducer.rejectComplexQueries become stuck with a 412KBytes GraphQL query selecting ~150000 fields. Did a profiling and stacktrace shows we are doing tremendous amount of work in OverlappingFieldsCanBeMerged

An example of the query is at here

We are using:

  • Sangria version 1.3.2
  • JVM 8 (with some Twitter internal customization)

A screenshot of part of the stacktrace (sorry I cannot provide complete stacktrace).

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
SimonAdameitcommented, Sep 19, 2019

We also experienced this issue at XING and invested some time to fix it. Here is the PR: https://github.com/sangria-graphql/sangria/pull/458 and here is the description of the algorithm.

1reaction
yannscommented, Sep 27, 2022

The faster version is now the default one starting from https://github.com/sangria-graphql/sangria/releases/tag/v3.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

OverlappingFieldsCanBeMerged (graphql-java 11.0 API) - javadoc.io
public class OverlappingFieldsCanBeMerged extends AbstractRule. See http://facebook.github.io/graphql/June2018/#sec-Field-Selection-Merging ...
Read more >
Migrating from v4.x to v5.x - GraphQL .NET
SDLPrinter is a highly optimized visitor for asynchronous non-blocking SDL output into ... OverlappingFieldsCanBeMerged validation rule enabled by default.
Read more >
sangria-graphql/sangria - Gitter
Regarding OverlappingFieldsCanBeMerged . ... If you would like to tackle this and optimize it even further, I would definitely appreciate it!
Read more >
Free Automated Malware Analysis Service - powered by Falcon ...
"GET /optimize.js?id=OPT-TJG4HR5 HTTP/1.1 ... "GET /optimize.js?id=OPT-TJG4HR5 HTTP/1.1 ... rules/OverlappingFieldsCanBeMerged"),D=require(".
Read more >
Optimize canMerge using graphql · 4c972f00bd - zuul
This can be optimized using graphql to only query the data we need with a single request. This reduces requests and load on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found