Open atombender opened 5 years ago
I agree, itβs important to have a mode that serializes to exactly the same query as was written (for tooling purposes), but for over-the-wire calls, it feels like white space and comments should be strippable. This also plays in to Query registration / Query deduplication .
When executing queries built with
graphql-tag
, the resulting AST seems to include all the whitespace, resulting in queries that are, in our case, about 30% larger when serialized to JSON than if all the unnecessary whitespace was stripped away.This doesn't have a big impact, but it does add bandwidth use, and it can mean that a query that would otherwise fit in a
GET
request might have to be executed in aPOST
request instead.I'd really like for Apollo to minimize queries automatically.