Relay

docker mysql主从复制

为君一笑 提交于 2019-12-10 05:03:29
1.下拉mysql镜像: docker pull mysql 此处选择在主机上保存配置文件,从而不会出现docker服务重启,配置文件需要重新配置的问题。 2.准备master的配置文件: mkdir -p /usr/local/mysqlData/master/cnf mkdir -p /usr/local/mysqlData/master/data vim /usr/local/mysqlData/master/cnf/mysql.cnf [mysqld] pid-file=/var/run/mysqld/mysqld.pid socket=/var/run/mysqld/mysqld.sock datadir=/var/lib/mysql secure-file-priv= NULL server-id=1 symbolic-links=0 log-bin=mysql-bin lower_case_table_names=1 !includedir /etc/mysql/conf.d/ 3.启动master容器: docker run -itd -p 3306:3306 --name mysqlMaster -v /usr/local/mysqlData/master/cnf/mysql.cnf:/etc/mysql/my.cnf -v /usr/local

Relay Modern nested pagination

别来无恙 提交于 2019-12-09 07:14:22
问题 I have a root query of songs , this is in a pagination container. I then have a nested property on songs called comments that I also want to be paginated because I don't want to load 10k comments for each song all at once. songsContainer.js: fragment songsContainer on Query { songs( first: $count after: $cursor genre: $genre filter: $filter ) @connection(key: "songsContainer_songs") { edges { node { audioId name coverImageUrl artist likes dislikes ...commentsContainer } } } } const

How to wire data to a deep component in react-router-relay?

雨燕双飞 提交于 2019-12-08 15:04:34
问题 I have a route like this <Route path="/search" component={Search}> The basic Search component looks likes this class Search extends React.Component { constructor (props) { super(props) this.state = {query: ''} } handleSubmit (event) { event.preventDefault() this.setState({query: this.refs.queryInput.value}) } renderSearchResult() { if (this.state.query === '') return <EmptySearchResult /> else return <SearchResult query={this.state.query}/> } render() { return ( <div className=

Are Relay and Graphql RESTful?

北慕城南 提交于 2019-12-08 08:10:07
问题 Although there are many differences between Graphql APIs and common REST APIs implemented with HTTP, I am wondering if these differences are syntactical or if Relay and Graphql are fundamentally non-RESTful. If so which constraint of REST do they violate? 回答1: GraphQL is not RESTful as it doesn't use uris and http methods to express the nature of the operations. You have one route (for example: /graphql) that you send all operations to - both queries and mutations, on all types of entities.

With GraphQL, what is the benefit or necessity of declaring a backing model “class” that does not vary from the GraphQL “Type” in any obvious way?

寵の児 提交于 2019-12-08 07:37:48
问题 I like the Universal Relay Boilerplate - in general I can tell they were very thoughtful about how they put this whole thing together, unlike most boilerplates for which folder organization and so on seems to be an intended afterthought (I guess because you won't do anything important at first, or something)... but not URB. Or at least we are picky about the same things. Why do the same annoying thing... ...except for one thing: I don't get why they do this. // Class used by GraphQL Server

运维守护神——数十万线上机器的守护【门神】

泪湿孤枕 提交于 2019-12-07 01:34:52
随着京东云业务的飞速发展,其需要管理的物理机、虚机以及各类容器已经达到了数十万之巨,在如此数量如此庞大资源机如何管理的课题面前,京东云意识到必须开发自己的高效、安全、稳定的资源机管理系统,为京东云乃至整个京东集团各项业务的发展提供坚实可靠的后盾,“门神”系统在这种情况下应运而生,并在经过多次京东618、11.11等诸多重大活动的检验后,变得愈发成熟稳定。 “门神”顾名思义,就是守护整个京东资源机云安全的守护神,是京东云平台自主研发的一套基于服务树角色授权的线上机器运维平台,该平台支持认证登录、系统运维和安全审计,可以对京东云平台所有的主机进行统一的访问控制、操作历史记录等,是符合4A的专业运维审计系统,构建统一、高效、安全运维通道,保障云端运维工作遵循法律法规要求、降低人为安全风险,提高运维效率。 设计目标 为了适应京东云业务快速发展、所需管理的物理机、虚机和容器数量指数级增加的现状,满足公司安全认证、高效运维、操作审计、职权管控的要求,门神设计初期就制定了如下目标: 安全认证 支持双因子认证机制,通过二维码、动态令牌等技术,控制账号密码泄露风险,防止运维人员身份冒用和复用。 高效运维 自研SSH交互界面,简洁易用,方便管理大量主机,简化运维和安全操作,提升运维效率;门神登录成功后支持资源机之间的无密码穿梭。 操作审计 全程记录运维人员的操作行为,操作内容支持各种维度信息查询

Are Relay and Graphql RESTful?

拈花ヽ惹草 提交于 2019-12-06 16:26:41
Although there are many differences between Graphql APIs and common REST APIs implemented with HTTP, I am wondering if these differences are syntactical or if Relay and Graphql are fundamentally non-RESTful. If so which constraint of REST do they violate? GraphQL is not RESTful as it doesn't use uris and http methods to express the nature of the operations. You have one route (for example: /graphql) that you send all operations to - both queries and mutations, on all types of entities. 来源: https://stackoverflow.com/questions/38709614/are-relay-and-graphql-restful

运维守护神——数十万线上机器的守护【门神】

点点圈 提交于 2019-12-06 16:22:45
随着京东云业务的飞速发展,其需要管理的物理机、虚机以及各类容器已经达到了数十万之巨,在如此数量如此庞大资源机如何管理的课题面前,京东云意识到必须开发自己的高效、安全、稳定的资源机管理系统,为京东云乃至整个京东集团各项业务的发展提供坚实可靠的后盾,“门神”系统在这种情况下应运而生,并在经过多次京东618、11.11等诸多重大活动的检验后,变得愈发成熟稳定。 “门神”顾名思义,就是守护整个京东资源机云安全的守护神,是京东云平台自主研发的一套基于服务树角色授权的线上机器运维平台,该平台支持认证登录、系统运维和安全审计,可以对京东云平台所有的主机进行统一的访问控制、操作历史记录等,是符合4A的专业运维审计系统,构建统一、高效、安全运维通道,保障云端运维工作遵循法律法规要求、降低人为安全风险,提高运维效率。 设计目标 为了适应京东云业务快速发展、所需管理的物理机、虚机和容器数量指数级增加的现状,满足公司安全认证、高效运维、操作审计、职权管控的要求,门神设计初期就制定了如下目标: 安全认证 支持双因子认证机制,通过二维码、动态令牌等技术,控制账号密码泄露风险,防止运维人员身份冒用和复用。 高效运维 自研SSH交互界面,简洁易用,方便管理大量主机,简化运维和安全操作,提升运维效率;门神登录成功后支持资源机之间的无密码穿梭。 操作审计 全程记录运维人员的操作行为,操作内容支持各种维度信息查询

With GraphQL, what is the benefit or necessity of declaring a backing model “class” that does not vary from the GraphQL “Type” in any obvious way?

穿精又带淫゛_ 提交于 2019-12-06 16:03:17
I like the Universal Relay Boilerplate - in general I can tell they were very thoughtful about how they put this whole thing together, unlike most boilerplates for which folder organization and so on seems to be an intended afterthought (I guess because you won't do anything important at first, or something)... but not URB. Or at least we are picky about the same things. Why do the same annoying thing... ...except for one thing: I don't get why they do this. // Class used by GraphQL Server export default class User { constructor( fields ) { this.id = fields.id this.User_AccountName = fields

Updating React state with Relay

给你一囗甜甜゛ 提交于 2019-12-06 08:17:29
With Relay, you create a React component as usual: class TodoApp extends React.Component { ... } And then component is wrapped in a Relay container: export default Relay.createContainer(TodoApp, { ... }); The Relay container will fetch data using GraphQL and then update the state. This is a higher order component and this state is then passed down as props to its children. This isn't (or doesn't appear to be) compatible with a flux implementation like Redux. Redux has a single global state object and it too has higher order components that pass props down to presentational components. So I don