Skip to content

Conversation

vhenzl
Copy link
Contributor

@vhenzl vhenzl commented Sep 14, 2021

Adds StringBlock::print() method, an equivalent of printBlockString() function from graphql-js. It's used to print string blocks in Printer and SchemaPrinter.

Relevant changes in the reference implementation:

The behaviour matches graphql-js v15 (v16 removes the indentation inside of block strings: graphql/graphql-js@45e33ce)

Equivalent of `printBlockString()` function from `graphql-js`
They have been removed from `graphql-js` as well. The use-cases are covered by `BlockStringTest`.
@vhenzl
Copy link
Contributor Author

vhenzl commented Sep 14, 2021

Ah, I didn't realise symfony/polyfill-php80 is just a transitive dev dependency :/

@codecov
Copy link

codecov bot commented Sep 14, 2021

Codecov Report

Merging #938 (1b2f90d) into master (88f9f49) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #938      +/-   ##
============================================
- Coverage     94.23%   94.23%   -0.01%     
  Complexity       50       50              
============================================
  Files           117      117              
  Lines          9679     9674       -5     
============================================
- Hits           9121     9116       -5     
  Misses          558      558              
Impacted Files Coverage Δ
src/Language/BlockString.php 100.00% <100.00%> (ø)
src/Language/Printer.php 99.25% <100.00%> (-0.03%) ⬇️
src/Utils/SchemaPrinter.php 98.94% <100.00%> (-0.09%) ⬇️

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 88f9f49...1b2f90d. Read the comment docs.

@spawnia spawnia merged commit 6e80894 into webonyx:master Sep 30, 2021
@vhenzl vhenzl deleted the stringblock-print branch October 1, 2021 07:58
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