-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Relay 2 #12
Comments
Yeah, will update when I get a chance to wrap my mind around it all |
Found is my favorite router and I looked into swapping out Relay classic with rudimentary modern support. One of the walls I ran into is that Pagination and Refetch containers do not expose the query that is used when creating the component for those containers. Therefore queries would (in that scenario) have to be manually exported and decoupled from the function calls: |
See facebook/relay#1687. I'm not really planning to touch the pagination or refetch containers; instead my current plan is to have each route for Relay 2 act like a |
Looking forward to seeing how it will work. Thanks again @taion! I am currently upgrading an app to Modern Relay and intend to continue using Found, which is why I have forked <Route
Component={Container}
initialVariables={{
...
}}
query={query}
/> Where |
@colepatrickturner That's not quite optimal – since you're nesting I need to do an upstream change in Found to how element resolvers work to properly support concepts like leaving routes, in order to enable the proper GC behavior. |
I'm doing a big change in our apps, converting to |
If you just want to use I'm going to merge that soon, but need to figure out release plans. I might cut a v0.2.x that supports a few minor Found API changes (https://github.com/4Catalyzer/found-relay/tree/relay-1) but still uses Relay v0.10.x, then cut a v0.3.x that supports Relay v1.x. If you actually want to use the modern API with |
Thanks @taion - I'm looking to use the |
Nope, I should have something up in a few days. |
Thanks though! |
@taion Thank you! I'm working on converting and getting all the code ready in the meantime (including a flow type libdef for I'll be interested to see your approach in a todo modern example. |
@rosskevin What error specifically are you seeing? |
All on the root queries, relative to import {graphql} from 'react-relay/compat'
export default {
viewer: () => graphql`query ViewerQueriesQuery { viewer }`
} The error will be:
|
See #27. https://github.com/4Catalyzer/found-relay/blob/relay-modern/test/modern/Resolver.test.js specifically demonstrates how to set up queries with Relay Modern. |
Released as v0.3.0-alpha.1. See https://github.com/taion/relay-todomvc/tree/found-modern for an example. |
Note BTW there's no |
Thank you @taion! |
@taion Thanks for this, it's working pretty well. Can't figure out how to get the environment / relay object on the props but I'm sure it's something I'm missing and explained somewhere in the example app 😄 |
It's the same as if you're just using |
@Rodeoclash here's a migration playbook to get to |
Yeah, it was a silly mistake. Either way, I construct the environment in a seperate module so can easily import into whatever component needs to do a mutation. @rosskevin Thanks for the link |
f5f341e docs: Fix docs ad96285 fix: Fix tooling a6cab23 fix: Various bugfixes (#41) 5c7fb83 chore: Update dependencies (#30) cc1085a more 5d616b2 chore: Update dependencies 76b9016 Update dependencies aebfa93 Fix build e6564fe Update dependencies e5d1f40 Update dependency ba4651a Update dependencies 80a966f Fix pattern 6a6abb9 Update dependencies 668f02a Downgrade graphql 57f77eb Merge branch 'found-modern' 4d2f7d8 Update dependencies e6d4e86 Use Found Relay Modern 8634bba Merge pull request #21 from taion/update-readme 597aeef Add found-modern-universal [ci skip] 6d89772 Use Found Relay Classic 2394893 Merge pull request #20 from taion/update-README b265b6f Update project naming in README [ci skip] 671f3c2 Merge pull request #19 from taion/update-README cc249f3 Update README [ci skip] 1a86b11 Merge branch 'master' into found-classic a15f5a1 Merge pull request #18 from taion/fix-readme 8b1f8a1 Remove wrong note in README 87bb04b Update for Found v0.3.x 317f4c1 Use Found 38a8dcc Merge pull request #17 from taion/upgrade-relay c7fa52b Upgrade to Relay v1.x (not Relay Modern) 6b062cd Merge pull request #15 from taion/fix-dev-source-map c690479 Fix dev source map 34ecfea Merge pull request #14 from taion/fix-webpack 59e36ec Fix webpack config efef591 Merge pull request #13 from taion/fix 1ca22f1 More fixes a30143f Merge pull request #12 from taion/update fe44bef Update dependencies 0e4a1fd Merge pull request #11 from alexmcmillan/master 078b6b9 Updating links to official Relay TodoMVC application and license ddfe02d Merge pull request #9 from taion/passPerPreset 36cb4ac Drop passPerPreset 3ef9ccb Merge pull request #8 from taion/fix-mutations a8a424e Fix mutations af2b8bc Merge pull request #7 from taion/update 76c1194 Update everything to newest 76c527a Upgrade react-router-relay 73529e1 Move back to React Router 5a5dcbe Update checked-in schema d4bba5d Update dependencies and move to rrtr (#6) edb3dff Update for React Router v2.x c7d70f6 Actually update the dumped schema 9174561 Fix limit to work with new graphql-js a4a5247 Update dependencies 596184e Update dependencies 5025f9b Update dependencies af2e837 Sync with upstream example b21e481 Properly use IndexLink 281bdd9 Update dependencies 4976138 Clarify how to access local example 1170d76 Update copy a bit ebd36b9 Need babel-runtime too 278cb42 Properly pin react-router dependency b7fcac6 Update README.md cf34189 Fix build script b2d8970 Update README.md 49b9545 Add missing dependency b65227b Update README.md bdd98cb Implement TodoMVC 09d5ca3 Initial commit REVERT: 437ff9c Squashed 'examples/todomvc-modern/' changes from aebfa93..76b9016 REVERT: 3386e8f Squashed 'examples/todomvc-modern/' changes from e5d1f40..aebfa93 REVERT: 78930fa Squashed 'examples/todomvc-modern/' changes from 80a966f..e5d1f40 REVERT: 953911e Squashed 'examples/todomvc-modern/' changes from 6a6abb9..80a966f REVERT: d9083b4 Squashed 'examples/todomvc-modern/' changes from 668f02a..6a6abb9 REVERT: 24d38a4 Squashed 'examples/todomvc-modern/' changes from e6d4e86..668f02a REVERT: bc74832 Squashed 'examples/todomvc-modern/' content from commit e6d4e86 git-subtree-dir: examples/todomvc git-subtree-split: f5f341e34fc98380c6ea7c12be394ad813568164
433892f Merge branch 'found-modern' into found-modern-universal f5f341e docs: Fix docs ad96285 fix: Fix tooling 22a3af9 fix: Fix network layer 6e057a1 Merge branch 'found-modern' into found-modern-universal a6cab23 fix: Various bugfixes (#41) 51270b1 Merge branch 'found-modern' into found-modern-universal 5c7fb83 chore: Update dependencies (#30) cc1085a more 5d616b2 chore: Update dependencies 1c103e3 Merge branch 'found-modern' into found-modern-universal 76b9016 Update dependencies cd6b3f1 Merge branch 'found-modern' into found-modern-universal aebfa93 Fix build 73c5c83 Update `found-modern-universal` example app with `relay-network-modern` (#28) 1260aab Merge branch 'found-modern' into found-modern-universal e6564fe Update dependencies e5d1f40 Update dependency 2bd7b54 Merge branch 'found-modern' into found-modern-universal ba4651a Update dependencies ae69ae5 Merge branch 'found-modern' into found-modern-universal 80a966f Fix pattern 59254ab Use hydrate instead of render 3b5fd9a Merge branch 'found-modern' into found-modern-universal 6a6abb9 Update dependencies d6d2397 Merge branch 'master' into found-modern-universal 668f02a Downgrade graphql 57f77eb Merge branch 'found-modern' 4d2f7d8 Update dependencies 8efad95 Relay Modern with server-side rendering e6d4e86 Use Found Relay Modern 8634bba Merge pull request #21 from taion/update-readme 597aeef Add found-modern-universal [ci skip] 6d89772 Use Found Relay Classic 2394893 Merge pull request #20 from taion/update-README b265b6f Update project naming in README [ci skip] 671f3c2 Merge pull request #19 from taion/update-README cc249f3 Update README [ci skip] 1a86b11 Merge branch 'master' into found-classic a15f5a1 Merge pull request #18 from taion/fix-readme 8b1f8a1 Remove wrong note in README 87bb04b Update for Found v0.3.x 317f4c1 Use Found 38a8dcc Merge pull request #17 from taion/upgrade-relay c7fa52b Upgrade to Relay v1.x (not Relay Modern) 6b062cd Merge pull request #15 from taion/fix-dev-source-map c690479 Fix dev source map 34ecfea Merge pull request #14 from taion/fix-webpack 59e36ec Fix webpack config efef591 Merge pull request #13 from taion/fix 1ca22f1 More fixes a30143f Merge pull request #12 from taion/update fe44bef Update dependencies 0e4a1fd Merge pull request #11 from alexmcmillan/master 078b6b9 Updating links to official Relay TodoMVC application and license ddfe02d Merge pull request #9 from taion/passPerPreset 36cb4ac Drop passPerPreset 3ef9ccb Merge pull request #8 from taion/fix-mutations a8a424e Fix mutations af2b8bc Merge pull request #7 from taion/update 76c1194 Update everything to newest 76c527a Upgrade react-router-relay 73529e1 Move back to React Router 5a5dcbe Update checked-in schema d4bba5d Update dependencies and move to rrtr (#6) edb3dff Update for React Router v2.x c7d70f6 Actually update the dumped schema 9174561 Fix limit to work with new graphql-js a4a5247 Update dependencies 596184e Update dependencies 5025f9b Update dependencies af2e837 Sync with upstream example b21e481 Properly use IndexLink 281bdd9 Update dependencies 4976138 Clarify how to access local example 1170d76 Update copy a bit ebd36b9 Need babel-runtime too 278cb42 Properly pin react-router dependency b7fcac6 Update README.md cf34189 Fix build script b2d8970 Update README.md 49b9545 Add missing dependency b65227b Update README.md bdd98cb Implement TodoMVC 09d5ca3 Initial commit REVERT: b76ab0f Squashed 'examples/todomvc-modern-universal/' changes from cd6b3f1..1c103e3 REVERT: d83d5db Squashed 'examples/todomvc-modern-universal/' changes from 2bd7b54..cd6b3f1 REVERT: 6ff12fe Squashed 'examples/todomvc-modern-universal/' changes from ae69ae5..2bd7b54 REVERT: 0da779c Squashed 'examples/todomvc-modern-universal/' changes from 59254ab..ae69ae5 REVERT: 9d6fdd1 Squashed 'examples/todomvc-modern-universal/' changes from d6d2397..59254ab REVERT: c1b5604 Squashed 'examples/todomvc-modern-universal/' changes from 8efad95..d6d2397 REVERT: f57793f Squashed 'examples/todomvc-modern-universal/' content from commit 8efad95 git-subtree-dir: examples/todomvc-universal git-subtree-split: 433892f4b2c9ef2fc251f2647d6c6db8e6df7304
Hi.
Any plan to support Relay Modern?
I am big fan of
found
,and looking forward to use the new relay with it.
The text was updated successfully, but these errors were encountered: