Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

(core) - Strip whitespace from query for GET requests (#908)

* strip whistespace from query

* add changeset

* Add comment-stripping to GET stringification

Co-authored-by: Phil Pluckthun <phil@kitten.sh>

authored by

Jovi De Croock
Phil Pluckthun
and committed by
GitHub
b609ce03 873ba9db

+11 -1
+5
.changeset/pretty-squids-learn.md
··· 1 + --- 2 + '@urql/core': patch 3 + --- 4 + 5 + Remove redundant whitespaces when using GET for graphql queries.
+6 -1
packages/core/src/internal/fetchOptions.ts
··· 49 49 } 50 50 51 51 if (body.query) { 52 - search.push('query=' + encodeURIComponent(body.query)); 52 + search.push( 53 + 'query=' + 54 + encodeURIComponent( 55 + body.query.replace(/([\s,]|#[^\n\r]+)+/g, ' ').trim() 56 + ) 57 + ); 53 58 } 54 59 55 60 if (body.variables) {