{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/graphql.github.io/pulls/comments/130869048","pull_request_review_id":53790067,"id":130869048,"diff_hunk":"@@ -1,24 +1,14 @@\n ---\n-title: Validation\n+title: 验证\n layout: ../_core/DocsLayout\n-category: Learn\n+category: 学习\n permalink: /learn/validation/\n next: /learn/execution/\n ---\n \n-By using the type system, it can be predetermined whether a GraphQL query\n-is valid or not. This allows servers and clients to effectively inform\n-developers when an invalid query has been created, without having to rely\n-on runtime checks.\n+通过使用类型系统，你可以预判一个查询是否有效。这让服务器和客户端可以在无效查询创建时就有效地通知开发者，而不用依赖运行时检查。\n \n-For our Star Wars example, the file\n-[starWarsValidation-test.js](https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsValidation-test.js)\n-contains a number of queries demonstrating various invalidities, and is a test\n-file that can be run to exercise the reference implementation's validator.\n-\n-To start, let's take a complex valid query. This is a nested query, similar to\n-an example from the previous section, but with the duplicated fields factored\n-out into a fragment:\n+对于我们的《星球大战》的案例，[starWarsValidation-test.js](https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsValidation-test.js)这个文件包含一些查询，演示了各种无效查询，它也是一个测试文件，用于检测参考实现的验证器。","path":"site/learn/Learn-Validation.md","position":25,"original_position":25,"commit_id":"87fae6e53afd10bb6dc5768fa2c1f60416bbcaf8","original_commit_id":"87fae6e53afd10bb6dc5768fa2c1f60416bbcaf8","user":{"login":"ydfzgyj","id":1191515,"avatar_url":"https://avatars2.githubusercontent.com/u/1191515?v=4","gravatar_id":"","url":"https://api.github.com/users/ydfzgyj","html_url":"https://github.com/ydfzgyj","followers_url":"https://api.github.com/users/ydfzgyj/followers","following_url":"https://api.github.com/users/ydfzgyj/following{/other_user}","gists_url":"https://api.github.com/users/ydfzgyj/gists{/gist_id}","starred_url":"https://api.github.com/users/ydfzgyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ydfzgyj/subscriptions","organizations_url":"https://api.github.com/users/ydfzgyj/orgs","repos_url":"https://api.github.com/users/ydfzgyj/repos","events_url":"https://api.github.com/users/ydfzgyj/events{/privacy}","received_events_url":"https://api.github.com/users/ydfzgyj/received_events","type":"User","site_admin":false},"body":"1. 链接和中文之间加上一个空格\r\n2. “包含一些查询，演示了各种无效查询” => “包含了若干对于各种无效查询的演示”","created_at":"2017-08-02T13:03:43Z","updated_at":"2017-08-02T13:12:48Z","html_url":"https://github.com/xitu/graphql.github.io/pull/56#discussion_r130869048","pull_request_url":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/xitu/graphql.github.io/pulls/comments/130869048"},"html":{"href":"https://github.com/xitu/graphql.github.io/pull/56#discussion_r130869048"},"pull_request":{"href":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56","id":133627842,"html_url":"https://github.com/xitu/graphql.github.io/pull/56","diff_url":"https://github.com/xitu/graphql.github.io/pull/56.diff","patch_url":"https://github.com/xitu/graphql.github.io/pull/56.patch","issue_url":"https://api.github.com/repos/xitu/graphql.github.io/issues/56","number":56,"state":"open","locked":false,"title":"learn validation翻译完成","user":{"login":"jonirrings","id":6275168,"avatar_url":"https://avatars0.githubusercontent.com/u/6275168?v=4","gravatar_id":"","url":"https://api.github.com/users/jonirrings","html_url":"https://github.com/jonirrings","followers_url":"https://api.github.com/users/jonirrings/followers","following_url":"https://api.github.com/users/jonirrings/following{/other_user}","gists_url":"https://api.github.com/users/jonirrings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonirrings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonirrings/subscriptions","organizations_url":"https://api.github.com/users/jonirrings/orgs","repos_url":"https://api.github.com/users/jonirrings/repos","events_url":"https://api.github.com/users/jonirrings/events{/privacy}","received_events_url":"https://api.github.com/users/jonirrings/received_events","type":"User","site_admin":false},"body":"pr晚了，有劳校对\r\n\r\nclose #12","created_at":"2017-08-02T05:52:28Z","updated_at":"2017-08-02T13:12:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82d16a6137d3f5545874136eb6b12743ea79f29b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56/commits","review_comments_url":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56/comments","review_comment_url":"https://api.github.com/repos/xitu/graphql.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xitu/graphql.github.io/issues/56/comments","statuses_url":"https://api.github.com/repos/xitu/graphql.github.io/statuses/87fae6e53afd10bb6dc5768fa2c1f60416bbcaf8","head":{"label":"jonirrings:Learn-Validation","ref":"Learn-Validation","sha":"87fae6e53afd10bb6dc5768fa2c1f60416bbcaf8","user":{"login":"jonirrings","id":6275168,"avatar_url":"https://avatars0.githubusercontent.com/u/6275168?v=4","gravatar_id":"","url":"https://api.github.com/users/jonirrings","html_url":"https://github.com/jonirrings","followers_url":"https://api.github.com/users/jonirrings/followers","following_url":"https://api.github.com/users/jonirrings/following{/other_user}","gists_url":"https://api.github.com/users/jonirrings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonirrings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonirrings/subscriptions","organizations_url":"https://api.github.com/users/jonirrings/orgs","repos_url":"https://api.github.com/users/jonirrings/repos","events_url":"https://api.github.com/users/jonirrings/events{/privacy}","received_events_url":"https://api.github.com/users/jonirrings/received_events","type":"User","site_admin":false},"repo":{"id":96385915,"name":"graphql.github.io","full_name":"jonirrings/graphql.github.io","owner":{"login":"jonirrings","id":6275168,"avatar_url":"https://avatars0.githubusercontent.com/u/6275168?v=4","gravatar_id":"","url":"https://api.github.com/users/jonirrings","html_url":"https://github.com/jonirrings","followers_url":"https://api.github.com/users/jonirrings/followers","following_url":"https://api.github.com/users/jonirrings/following{/other_user}","gists_url":"https://api.github.com/users/jonirrings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonirrings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonirrings/subscriptions","organizations_url":"https://api.github.com/users/jonirrings/orgs","repos_url":"https://api.github.com/users/jonirrings/repos","events_url":"https://api.github.com/users/jonirrings/events{/privacy}","received_events_url":"https://api.github.com/users/jonirrings/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonirrings/graphql.github.io","description":"GraphQL Documentation at graphql.org","fork":true,"url":"https://api.github.com/repos/jonirrings/graphql.github.io","forks_url":"https://api.github.com/repos/jonirrings/graphql.github.io/forks","keys_url":"https://api.github.com/repos/jonirrings/graphql.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonirrings/graphql.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonirrings/graphql.github.io/teams","hooks_url":"https://api.github.com/repos/jonirrings/graphql.github.io/hooks","issue_events_url":"https://api.github.com/repos/jonirrings/graphql.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/jonirrings/graphql.github.io/events","assignees_url":"https://api.github.com/repos/jonirrings/graphql.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/jonirrings/graphql.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/jonirrings/graphql.github.io/tags","blobs_url":"https://api.github.com/repos/jonirrings/graphql.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonirrings/graphql.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonirrings/graphql.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonirrings/graphql.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonirrings/graphql.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/jonirrings/graphql.github.io/languages","stargazers_url":"https://api.github.com/repos/jonirrings/graphql.github.io/stargazers","contributors_url":"https://api.github.com/repos/jonirrings/graphql.github.io/contributors","subscribers_url":"https://api.github.com/repos/jonirrings/graphql.github.io/subscribers","subscription_url":"https://api.github.com/repos/jonirrings/graphql.github.io/subscription","commits_url":"https://api.github.com/repos/jonirrings/graphql.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonirrings/graphql.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonirrings/graphql.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonirrings/graphql.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonirrings/graphql.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/jonirrings/graphql.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonirrings/graphql.github.io/merges","archive_url":"https://api.github.com/repos/jonirrings/graphql.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonirrings/graphql.github.io/downloads","issues_url":"https://api.github.com/repos/jonirrings/graphql.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/jonirrings/graphql.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/jonirrings/graphql.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/jonirrings/graphql.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonirrings/graphql.github.io/labels{/name}","releases_url":"https://api.github.com/repos/jonirrings/graphql.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/jonirrings/graphql.github.io/deployments","created_at":"2017-07-06T03:46:59Z","updated_at":"2017-07-06T03:47:01Z","pushed_at":"2017-08-02T07:01:40Z","git_url":"git://github.com/jonirrings/graphql.github.io.git","ssh_url":"git@github.com:jonirrings/graphql.github.io.git","clone_url":"https://github.com/jonirrings/graphql.github.io.git","svn_url":"https://github.com/jonirrings/graphql.github.io","homepage":null,"size":11171,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"zh-cn"}},"base":{"label":"xitu:zh-Hans","ref":"zh-Hans","sha":"c35e3968b7d4a46b35e9d7022ed65b41ad83dd99","user":{"login":"xitu","id":10482599,"avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"repo":{"id":97575269,"name":"graphql.github.io","full_name":"xitu/graphql.github.io","owner":{"login":"xitu","id":10482599,"avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xitu/graphql.github.io","description":"GraphQL Documentation at graphql.org","fork":true,"url":"https://api.github.com/repos/xitu/graphql.github.io","forks_url":"https://api.github.com/repos/xitu/graphql.github.io/forks","keys_url":"https://api.github.com/repos/xitu/graphql.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xitu/graphql.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xitu/graphql.github.io/teams","hooks_url":"https://api.github.com/repos/xitu/graphql.github.io/hooks","issue_events_url":"https://api.github.com/repos/xitu/graphql.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/xitu/graphql.github.io/events","assignees_url":"https://api.github.com/repos/xitu/graphql.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/xitu/graphql.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/xitu/graphql.github.io/tags","blobs_url":"https://api.github.com/repos/xitu/graphql.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xitu/graphql.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xitu/graphql.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/xitu/graphql.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xitu/graphql.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/xitu/graphql.github.io/languages","stargazers_url":"https://api.github.com/repos/xitu/graphql.github.io/stargazers","contributors_url":"https://api.github.com/repos/xitu/graphql.github.io/contributors","subscribers_url":"https://api.github.com/repos/xitu/graphql.github.io/subscribers","subscription_url":"https://api.github.com/repos/xitu/graphql.github.io/subscription","commits_url":"https://api.github.com/repos/xitu/graphql.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/xitu/graphql.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/xitu/graphql.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/xitu/graphql.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/xitu/graphql.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/xitu/graphql.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xitu/graphql.github.io/merges","archive_url":"https://api.github.com/repos/xitu/graphql.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xitu/graphql.github.io/downloads","issues_url":"https://api.github.com/repos/xitu/graphql.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/xitu/graphql.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/xitu/graphql.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/xitu/graphql.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xitu/graphql.github.io/labels{/name}","releases_url":"https://api.github.com/repos/xitu/graphql.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/xitu/graphql.github.io/deployments","created_at":"2017-07-18T08:43:19Z","updated_at":"2017-07-28T07:58:57Z","pushed_at":"2017-08-02T12:46:48Z","git_url":"git://github.com/xitu/graphql.github.io.git","ssh_url":"git@github.com:xitu/graphql.github.io.git","clone_url":"https://github.com/xitu/graphql.github.io.git","svn_url":"https://github.com/xitu/graphql.github.io","homepage":null,"size":10851,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":50,"forks":8,"open_issues":50,"watchers":11,"default_branch":"zh-Hans"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56"},"html":{"href":"https://github.com/xitu/graphql.github.io/pull/56"},"issue":{"href":"https://api.github.com/repos/xitu/graphql.github.io/issues/56"},"comments":{"href":"https://api.github.com/repos/xitu/graphql.github.io/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/xitu/graphql.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xitu/graphql.github.io/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/graphql.github.io/statuses/87fae6e53afd10bb6dc5768fa2c1f60416bbcaf8"}}}}
{"actor":{"display_login":"ydfzgyj"}}