Closed damienwebdev closed 3 years ago
This also has a performance penalty associated with it -- https://bugs.chromium.org/p/chromium/issues/detail?id=1182806
It's a breaking change. The stripIgnoredCharacters
was introduced in graphql@14.3.0
. I will create a PR that will let you intercept the query printing logic so you could use stripIgnoredCharacters
+ print
instead of just print
.
We will use your PR and make it the default in next major version!
See: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
This came up in https://github.com/graycoreio/daffodil when trying to send GraphQl queries as GET (for caching reasons with the GraphQL API of the ecommerce system Magento 2).
The deeper a query became, the more
%20
characters were added to the URL, which eventually overflowed Chrome's (and various other browser's) max URL length.This strips the useless characters out, reduces bandwidth consumption, and saves us all from some painful edge-cases.
Checklist: