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.

fix(core): Apply maskTypename earlier in the chain (#3298)

authored by

Phil Pluckthun and committed by
GitHub
8b8cf54a 19d26748

+13 -8
+5
.changeset/curvy-coins-travel.md
··· 1 + --- 2 + '@urql/core': patch 3 + --- 4 + 5 + Re-order `maskTypename` to apply masking earlier in the chain.
+8 -8
packages/core/src/client.ts
··· 629 629 ) 630 630 ); 631 631 632 + // Mask typename properties if the option for it is turned on 633 + if (opts.maskTypename) { 634 + result$ = pipe( 635 + result$, 636 + map(res => ({ ...res, data: maskTypename(res.data, true) })) 637 + ); 638 + } 639 + 632 640 if (operation.kind !== 'query') { 633 641 // Interrupt subscriptions and mutations when they have no more results 634 642 result$ = pipe( ··· 702 710 onStart(() => { 703 711 nextOperation(operation); 704 712 }) 705 - ); 706 - } 707 - 708 - // Mask typename properties if the option for it is turned on 709 - if (opts.maskTypename) { 710 - result$ = pipe( 711 - result$, 712 - map(res => ({ ...res, data: maskTypename(res.data, true) })) 713 713 ); 714 714 } 715 715