diff --git a/test/react-web/server/index.test.tsx b/test/react-web/server/index.test.tsx index a65c1bc249..41eddac900 100644 --- a/test/react-web/server/index.test.tsx +++ b/test/react-web/server/index.test.tsx @@ -54,6 +54,30 @@ describe('SSR', () => { }); }); + it('should pick up queries deep in the render tree', () => { + + const query = gql`{ currentUser { firstName } }`; + const data = { currentUser: { firstName: 'James' } }; + const networkInterface = mockNetworkInterface( + { request: { query }, result: { data }, delay: 50 } + ); + const apolloClient = new ApolloClient({ networkInterface }); + + const WrappedElement = graphql(query)(({ data }) => ( +