38 Commits
Author SHA1 Message Date
Matt b52b017e52 initialize state to null if not when not set (#1310)
* initialize state to null if not set by components constructor, fixes #1249

* add changelog
2017-10-31 12:51:29 -07:00
Mouad Debbar f814f602bb include SSR improvements 2017-10-24 10:57:58 -07:00
Curtis Layne cf6e3a7b29 support arrays in ssr 2017-10-24 10:44:13 -07:00
James Baxley a28d865870 new rc start 2017-10-20 06:24:09 -07:00
James Baxley 22e8a30fc3 initial 2.0 start 2017-09-27 00:39:11 -04:00
James Baxley abf4347acf fix exports (#925)
* fix exports

* update changelog
2017-08-01 12:15:43 -04:00
James Baxley 8af4384ad2 run prettier on all files (#819) 2017-07-05 15:51:20 -04:00
Jan Amann 1452b3cbf9 Fix server side rendering when using the cache-and-network fetchPolicy (#688)
* Fix server side rendering when using the ‘cache-and-network’ `fetchPolicy`.

* Updated changelog.
2017-05-04 08:13:35 -04:00
Derek P Sifford 3a03b09b98 convert React.PropTypes to "prop-types" module 2017-04-13 10:31:55 -04:00
Caleb Meredith 4afb2707c3 Update index.test.tsx 2017-03-14 14:52:22 -04:00
Tom Coleman d13b4f5333 Throw errors from SSR, but still execute all queries.
See https://github.com/apollographql/react-apollo/pull/488#issuecomment-284415525
2017-03-14 16:53:57 +11:00
Tom Coleman 97b41599c5 Merge branch 'master' into 406-ssr-errors 2017-03-14 16:44:27 +11:00
Jonas Helfer 187256aecc update tests to use fetchPolicy and set notifyOnNetworkStatusChange 2017-03-09 17:25:49 -08:00
Tom Coleman 98b60ed6cd Ensure that SSR completes when the GraphQL server throws errors.
See #406.

We still end up rendering a loading screen but that is better than
just bailing out of SSR completely.
2017-02-27 11:41:02 +11:00
Caleb Meredith 9a8216bb8e Fix failing tests on master (#448)
* fix failing tests

* add generic type parameter
2017-02-03 19:21:41 -05:00
Jonas Helfer 3a47ed624f remove fragment tests from server 2017-01-26 16:04:49 -08:00
Tom Coleman c6e74d6ca0 Use instance.fetchData rather than a static method. (#355)
* Use instance.fetchData rather than a static method.

Fixes issue with Redux's `connect` hoisting `fetchData` statically.

See #350

* Added changelog entry
2016-12-05 21:50:29 -05:00
Tom Coleman 316b4cf9bd Refactor to calculate data a render time 2016-11-14 12:00:42 +11:00
Tom Coleman 800ce408e7 Fix (common) edge cases as inspired by #317 2016-11-10 14:11:39 +11:00
Tom Coleman d127d02c0b Refactor SSR code to use walkTree
For #259 et al
2016-11-07 11:39:27 +11:00
James Baxley 87bcc44eb5 Testing tools and sample project included in builds (#240)
* setup base CRA project, start work on test utils, add dependency testing

* change test running in children

* didn't know travis persisted cds

* rebased and added subscription mocked util

* fix syntax in travis file

* rebased and updated to new AC

* update tests to new AC

* switch to use internal testing utilties

* remove extra file

* turn off flow for now

* add a few sample projects and locally fix failing test env

* fix directory name

* revert back AC for type issue

* chore: version bump
2016-10-31 01:33:28 -04:00
James Baxley 71bad83373 Fix forceFetch on SSR (#293)
* failing test case

* annnndddd fix the bug

* update changelog
2016-10-28 13:02:36 -04:00
Sashko Stubailo d73392cf05 Fix SSR tests 2016-10-17 23:41:01 -07:00
Tom Coleman 65127351a7 Added a query with a nested container.
Again for #250
2016-10-17 13:04:57 +11:00
Tom Coleman 39e950e76a Added an explicit nested queries test
(trying to replicate #250)
2016-10-17 12:52:42 +11:00
Tom Coleman b6612f9e5f Fix issue with SSR on a mutation wrapping a query
We were hoisting `fetchData` onto the mutation HOC, which led to the
query executing twice
2016-10-17 12:37:10 +11:00
Tom Coleman 246eca0f46 Observable query refactor (#211)
* Fix variable name in test

* Add testonly command

* Bring across changed to mockedNetworkInterface

From https://github.com/apollostack/apollo-client/commit/3779572a21f90cd149727d13300df144ca7c80e2

* Enable source maps in tests

* Add lodash.pick to dependencies.

* First pass at refactor (WIP), skipping some tests

* Get SSR working with refactored AC

* Fix a bunch of tests I'd skipped

* Removed a bunch of remaining XXX notes

* Linting

* Update apollo version so this works w/ a branch!

* Fixed some problems with the rebase

* reintroduce skip test

* update changelog
2016-10-07 22:36:29 -04:00
James Baxley ec24cce7eb configure new skip method in options 2016-10-07 16:10:14 -04:00
John Pinkerton 1811a06973 Jest Refactor (#201)
* move all tests to jest

* fix import issue in react native test

* start switching out enzyme for react test renderer

* start working on some typings issues

* comment out coverage for no

* don't run tests in lib directory

* fix import issue in react native test

* run compile before file checks

* fix wrapped component test

* fix mobx test

* fix query tests

* fix redux tests

* try jest coverage

* remove unneeded deps

* update rebased tests for jest
2016-09-18 15:20:31 -04:00
James Baxley 4271f68d60 fix ssr issues with lifecycle events (#205)
* fix ssr issues with lifecycle events

* update changelog
2016-09-12 08:53:50 -04:00
James Baxley bd9d94877b lint fix 2016-09-05 11:25:48 -04:00
James Baxley 43e78b6f45 fix failing test from update SSR api 2016-09-05 11:25:00 -04:00
James Baxley 6ed588ed45 Merge branch 'master' of https://github.com/apollostack/react-apollo 2016-09-05 11:17:53 -04:00
James Baxley 831489c0e7 fix react warnings and change renderToString api 2016-08-31 21:49:49 -04:00
Vladimir Guguiev f4b9f0e2e0 fix SSR when query contains fragments (#178) 2016-08-30 07:23:33 -04:00
James Baxley 7c148f73d1 Fix context issues on SSR (#165)
* reset branch

* fix context errors, although I don't love this

* added changelog
2016-08-22 22:34:00 -04:00
James Baxley f0da04fb94 Fix SSR with mutations, fix mixing initial props methods, allow object for options (#145)
* fix ssr oddity (why does this work?) and fix missing methods on initial mount

* allow options to be an object

* version bump
2016-08-15 20:47:42 -04:00
James Baxley da13407707 added in react-native testing integration 🚀 2016-08-11 22:38:38 -04:00