Skip to content

Commit

Permalink
Remove Object Spreading for Transformed Subscription Results (#928)
Browse files Browse the repository at this point in the history
* Remove Object Spreading for Transformed Subscription Results

* update readme.
  • Loading branch information
ericlewis authored and hwillson committed Sep 7, 2018
1 parent 4bdc1fb commit 4d74d8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
[@luk3thomas](https://github.com/luk3thomas) in [#932](https://github.com/apollographql/graphql-tools/pull/932)
* Changes to `extractExtensionDefinitions` to properly support `graphql-js` input extensions. <br/>
[@jure](https://github.com/jure) in [#948](https://github.com/apollographql/graphql-tools/pull/948)
* Stop automatically shallow cloning (via object spread syntax) transformed subscription results. Transformed subscription results are not always objects, which means object spreading can lead to invalid results. <br/>
[@ericlewis](https://github.com/ericlewis) in [#928](https://github.com/apollographql/graphql-tools/pull/928)
* Documentation updates. <br/>
[@Amorites](https://github.com/Amorites) in [#944](https://github.com/apollographql/graphql-tools/pull/944) <br/>
[@trevor-scheer](https://github.com/trevor-scheer) in [#946](https://github.com/apollographql/graphql-tools/pull/946) <br/>
Expand Down
4 changes: 1 addition & 3 deletions src/stitching/delegateToSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ async function delegateToSchemaImplementation(
// for some reason the returned transformedResult needs to be nested inside the root subscription field
// does not work otherwise...
return {
[subscriptionKey]: {
...transformedResult
},
[subscriptionKey]: transformedResult,
};
});
}
Expand Down

0 comments on commit 4d74d8a

Please sign in to comment.