Skip to content

Conversation

@benjie
Copy link
Member

@benjie benjie commented Oct 30, 2020

Follow up to #1542; this passes the schema through to mergeAST so that the query can be further simplified in a type-aware way (i.e. spreading a fragment of type Test inside a scope that can only be type Test will result in the fragment being fully inlined).

Given this query:

{ test { id ...T } } fragment T on Test { isTest }

Pressing "Merge" previously simplified to:

{ test { id ... on Test { isTest } } }

But with this change, it now simplifies to:

{ test { id isTest } }
@codecov
Copy link

codecov bot commented Oct 30, 2020

Codecov Report

Merging #1703 into main will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@ Coverage Diff @@ ## main #1703 +/- ## ======================================= Coverage 63.81% 63.81% ======================================= Files 86 86 Lines 4692 4692 Branches 1256 1256 ======================================= Hits 2994 2994 Misses 1440 1440 Partials 258 258 
Impacted Files Coverage Δ
packages/graphiql/src/components/GraphiQL.tsx 59.89% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccd1cfc...b25646c. Read the comment docs.

@acao
Copy link
Member

acao commented Nov 2, 2020

thank you @benjie !

@acao acao merged commit 238d0b5 into main Nov 2, 2020
@acao acao deleted the typeaware-merge branch November 2, 2020 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants