這是 Relay Classic 跟 Relay Modern API 之間的轉換參考。
Classic:<RelayRootContainer>
Modern:<QueryRenderer>
Classic:Relay.createContainer
Modern:createFragmentContainer
Classic:Relay.createContainer
Modern:createRefetchContainer
Classic:Relay.createContainer
Modern:createPaginationContainer
Classic:this.props.relay.setVariable({foo: bar}...)
Modern:在 Refetch Container 理 this.props.relay.refetch({foo: bar}...
Classic:this.props.relay.setVariable({count: prevCount + pageSize}...)
Modern:在 Pagination Container 裡 this.props.relay.loadMore(pageSize...)
Classic:this.props.relay.forceFetch()
Modern:在 Pagination Container 裡 this.props.relay.refetchConnection(...)
或是:在 Refetch Container 裡 this.props.relay.refetch({}, callback, {force: true})
Classic:this.props.relay.commitUpdate(mutation...)
Modern:commitMutation(this.props.relay.environment, {mutation...})