{"pageProps":{"posts":[{"id":1,"title":"Centos初始化2","slug":"cent-os2%401-4","excerpt":"## proxychains-ng\n\n```bash\ngit clone https://github.com/rofl0r/proxychains-ng\ncd proxychains-ng\n./configure --prefix=/usr --sysconfdir=/etc\nmake\nmake install\nmake install-config # 生成配置文件\necho 'http 10.100.100.136 4411' >> /etc/proxychains.conf # 输入代理设置\n```\n\n","draft":false,"createdAt":"2017-01-03T16:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":1,"slug":"linux","name":"Linux","__typename":"Category"}],"tags":[{"id":1,"slug":"centos","name":"centos","__typename":"Tag"},{"id":2,"slug":"tmux","name":"tmux","__typename":"Tag"},{"id":3,"slug":"prezto","name":"prezto","__typename":"Tag"}],"__typename":"Post"},{"id":2,"title":"GraphQL Learn (1) - Queries and Mutations","slug":"graph-ql-learn-%281%29-queries-and-mutations","excerpt":"在此页面上,你将详细了解如何查询 GrahQL 服务器。\n\n## 字段(Fields)\n\n最简单的,GraphQL 是关于要求对象上的特定字段。我们先来看一个非常简单的查询,当我们运行它时得到结果:\n\n```graphql\n{\n hero {\n name\n }\n}\n```\n\n```js\n{\n \"data\": {\n \"hero\": {\n \"name\": \"R2-D2\"\n }\n }\n}\n```\n\n可以看到,查询与结果的形状完全相同。这对于 GraphQL 是至关重要的,因为您总是收到您期望的内容,并且服务器确切知道客户端要求哪些字段。\n\n","draft":false,"createdAt":"2017-08-14T16:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":2,"slug":"web","name":"Web","__typename":"Category"}],"tags":[{"id":4,"slug":"graph-ql","name":"GraphQL","__typename":"Tag"}],"__typename":"Post"},{"id":3,"title":"今日头条笔试解题报告(10.17)","slug":"toutiao-test","excerpt":"之前随便投了一下今日头条竟然过了,虽然不是很想去,但是已经给了我笔试邀约好歹也就做一下,锻炼锻炼脑子,说句实话还是挺喜欢头条的题目的,做起来很有以前 ACM 刷题的感觉,不像其他公司总感觉\"工程化\"比较多。\n\n## 推箱子\n\n第一题比较简单,表面上无从下手但是仔细想想应该能想出来的,本质上跟走迷宫问题本质上是一致的,只不过在这题中状态既要保存人的位置也要保存箱子的位置。暴力搜索能够,AC 代码:\n\n","draft":false,"createdAt":"2017-10-18T01:26:50+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":3,"slug":"acm","name":"ACM","__typename":"Category"}],"tags":[{"id":5,"slug":"%E6%8B%9B%E8%81%98","name":"招聘","__typename":"Tag"},{"id":6,"slug":"%E7%BD%91%E6%98%93","name":"网易","__typename":"Tag"},{"id":7,"slug":"lcs","name":"LCS","__typename":"Tag"},{"id":8,"slug":"%E6%9A%B4%E5%8A%9B","name":"暴力","__typename":"Tag"}],"__typename":"Post"},{"id":4,"title":"体验I3之美","slug":"beautifull-i3","excerpt":"![enter description here][1]\n先晒张日常桌面图。Gnome3 用了半年了一直被其蹩脚的交互和层出不穷的 Bug 所折磨。虽然 Gnome3 很漂亮,很简洁,但是毕竟漂亮不能当饭吃。套餐这种东西虽然简单省事,但是终究不是为你所量身定制的,总有其中一样不合你口味。因此,我决定再次抛弃“开箱即用”的 DE(Desktop Environment),在 WM(Window Manager)的基础上自己打造一套适合自己的桌面环境。\n\n","draft":false,"createdAt":"2017-03-19T16:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":1,"slug":"linux","name":"Linux","__typename":"Category"},{"id":5,"slug":"archlinux","name":"Archlinux","__typename":"Category"}],"tags":[{"id":9,"slug":"gnome","name":"gnome","__typename":"Tag"},{"id":10,"slug":"i3wm","name":"i3wm","__typename":"Tag"}],"__typename":"Post"},{"id":5,"title":"GraphQL Learn (3) - Validation","slug":"graph-ql-learn-%283%29-validation","excerpt":"通过使用类型系统,可以预先确定 GraphQL 查询是否有效。 这样可以让服务器和客户端有效地通知开发人员在创建无效查询时,无需在运行时检查。\n\n对于我们的星球大战示例,文件[starWarsValidation-test.js](https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsValidation-test.js)包含许多无效的查询,可以用来测试当前实现的验证器。\n\n首先,我们来看一个复杂的有效查询。 这是一个嵌套查询,类似于上一节的一个示例,但将重复的字段分解成一个片段:\n\n","draft":false,"createdAt":"2017-08-14T16:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":2,"slug":"web","name":"Web","__typename":"Category"}],"tags":[{"id":4,"slug":"graph-ql","name":"GraphQL","__typename":"Tag"}],"__typename":"Post"},{"id":6,"title":"Basic Algorithms in Go","slug":"basic-algorithms-in-go","excerpt":"最近学 Go,感觉挺不错的。闲来无事用它写了几种常用的基础算法。\n\n## 快排\n\n思想很简单,实现起来为了方便每次以 left 作为基准,也可以使用 BFS 来节省递归栈:\n\n```golang\n// QuickSort returns a sorted slice\nfunc QuickSort(arr []int) {\n\tif len(arr) <= 1 {\n\t\treturn\n\t}\n\tleft, right := 0, len(arr)-1\n\tfor left < right {\n\t\tif arr[left+1] > arr[left] {\n\t\t\tarr[left+1], arr[right] = arr[right], arr[left+1]\n\t\t\tright--\n\t\t} else {\n\t\t\tarr[left+1], arr[left] = arr[left], arr[left+1]\n\t\t\tleft++\n\t\t}\n\t}\n\tQuickSort(arr[:left])\n\tQuickSort(arr[left+1:])\n}\n```\n\n","draft":false,"createdAt":"2017-01-10T00:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":2,"name":"Kevin Tan","email":"stkevintan@zju.edu.cn","bio":"Major in Typescript, Minor in Rust, C#","githubId":"5887203","__typename":"User"},"categories":[{"id":3,"slug":"acm","name":"ACM","__typename":"Category"}],"tags":[{"id":12,"slug":"algorithm","name":"algorithm","__typename":"Tag"},{"id":13,"slug":"golang","name":"golang","__typename":"Tag"}],"__typename":"Post"},{"id":7,"title":"GraphQL Learn (5) - Introspection","slug":"graph-ql-learn-%285%29-introspection","excerpt":"查询 GraphQL 架构有关它支持的查询的信息通常很有用。 GraphQL 允许我们使用内省系统来做到这一点!对于我们的星球大战例子来说,文件[starWarsIntrospection-test.js](https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsIntrospection-test.js)包含许多查询内省系统的查询,并且是一个完整的按照规范实现的测试文件。\n\n我们设计了类型系统,所以我们应该知道系统中可用的类型。但是如果不知道,我们还可以通过查询\\_\\_schema 字段来询问 GraphQL。这个字段始终存在于根类型中。\n\n","draft":false,"createdAt":"2017-08-14T16:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":2,"slug":"web","name":"Web","__typename":"Category"}],"tags":[{"id":4,"slug":"graph-ql","name":"GraphQL","__typename":"Tag"}],"__typename":"Post"},{"id":8,"title":"GraphQL Learn (2) - Schemas and Types","slug":"graph-ql-learn-%282%29-schemas-and-types","excerpt":"在此页面上,您将了解有关 GraphQL 类型系统的所有知识,以及如何描述可查询哪些数据。 由于 GraphQL 可以与任何后端框架或编程语言一起使用,因此我们将远离实现特定的详细信息,仅讨论概念。\n\n### 类型系统(Type System)\n\n如果您以前看过 GraphQL 查询,那么你应该知道 GraphQL 查询语言基本上是在对象上选择字段。 所以在以下查询中:\n\n```graphql\n{\n hero {\n name\n appearsIn\n }\n}\n```\n\n","draft":false,"createdAt":"2017-08-14T16:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":2,"slug":"web","name":"Web","__typename":"Category"}],"tags":[{"id":4,"slug":"graph-ql","name":"GraphQL","__typename":"Tag"}],"__typename":"Post"},{"id":9,"title":"JS DOM API分析","slug":"dom-compatibility-note","excerpt":"## Element.classList\n\n返回 DOMTokenList,IE version>=10 不完全支持。\n\n1. 不支持 classList.contains 的第二个参数(force)\n2. add 和 remove 方法不支持多参数\n3. SVG,MathML 结点没有 classList 属性\n\n","draft":false,"createdAt":"2016-11-02T21:07:21+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":2,"slug":"web","name":"Web","__typename":"Category"}],"tags":[{"id":16,"slug":"javascirpt","name":"javascirpt","__typename":"Tag"},{"id":17,"slug":"dom","name":"dom","__typename":"Tag"},{"id":18,"slug":"html","name":"html","__typename":"Tag"}],"__typename":"Post"},{"id":10,"title":"GraphQL Learn (4) - Execution","slug":"graph-ql-learn-%284%29-execution","excerpt":"经过验证,GraphQL 查询由 GraphQL 服务器执行,然后返回一个与查询形状相同的结果,通常为 JSON。\n\nGraphQL 无法执行没有类型系统的查询,让我们使用类型系统例子来说明执行查询,这个例子是我们教程中使用的类型系统中的一部分:\n\n```graphql\ntype Query {\n human(id: ID!): Human\n}\ntype Human {\n name: String\n appearsIn: [Episode]\n starships: [Starship]\n}\nenum Episode {\n NEWHOPE\n EMPIRE\n JEDI\n}\ntype Starship {\n name: String\n}\n```\n\n","draft":false,"createdAt":"2017-08-14T16:00:00+00:00","updatedAt":"2020-07-28T05:18:21+00:00","author":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"categories":[{"id":2,"slug":"web","name":"Web","__typename":"Category"}],"tags":[{"id":4,"slug":"graph-ql","name":"GraphQL","__typename":"Tag"}],"__typename":"Post"}],"apolloState":{"Post:1":{"id":1,"title":"Centos初始化2","slug":"cent-os2%401-4","excerpt":"## proxychains-ng\n\n```bash\ngit clone https://github.com/rofl0r/proxychains-ng\ncd proxychains-ng\n./configure --prefix=/usr --sysconfdir=/etc\nmake\nmake install\nmake install-config # 生成配置文件\necho 'http 10.100.100.136 4411' >> /etc/proxychains.conf # 输入代理设置\n```\n\n","draft":false,"createdAt":{"type":"json","json":"2017-01-03T16:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:1","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:1","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:2","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:3","typename":"Tag"}],"__typename":"Post"},"User:1":{"id":1,"name":"admin","email":"unknown@unknown.com","bio":"","githubId":"22012452","__typename":"User"},"Category:1":{"id":1,"slug":"linux","name":"Linux","__typename":"Category"},"Tag:1":{"id":1,"slug":"centos","name":"centos","__typename":"Tag"},"Tag:2":{"id":2,"slug":"tmux","name":"tmux","__typename":"Tag"},"Tag:3":{"id":3,"slug":"prezto","name":"prezto","__typename":"Tag"},"Post:2":{"id":2,"title":"GraphQL Learn (1) - Queries and Mutations","slug":"graph-ql-learn-%281%29-queries-and-mutations","excerpt":"在此页面上,你将详细了解如何查询 GrahQL 服务器。\n\n## 字段(Fields)\n\n最简单的,GraphQL 是关于要求对象上的特定字段。我们先来看一个非常简单的查询,当我们运行它时得到结果:\n\n```graphql\n{\n hero {\n name\n }\n}\n```\n\n```js\n{\n \"data\": {\n \"hero\": {\n \"name\": \"R2-D2\"\n }\n }\n}\n```\n\n可以看到,查询与结果的形状完全相同。这对于 GraphQL 是至关重要的,因为您总是收到您期望的内容,并且服务器确切知道客户端要求哪些字段。\n\n","draft":false,"createdAt":{"type":"json","json":"2017-08-14T16:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:2","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:4","typename":"Tag"}],"__typename":"Post"},"Category:2":{"id":2,"slug":"web","name":"Web","__typename":"Category"},"Tag:4":{"id":4,"slug":"graph-ql","name":"GraphQL","__typename":"Tag"},"Post:3":{"id":3,"title":"今日头条笔试解题报告(10.17)","slug":"toutiao-test","excerpt":"之前随便投了一下今日头条竟然过了,虽然不是很想去,但是已经给了我笔试邀约好歹也就做一下,锻炼锻炼脑子,说句实话还是挺喜欢头条的题目的,做起来很有以前 ACM 刷题的感觉,不像其他公司总感觉\"工程化\"比较多。\n\n## 推箱子\n\n第一题比较简单,表面上无从下手但是仔细想想应该能想出来的,本质上跟走迷宫问题本质上是一致的,只不过在这题中状态既要保存人的位置也要保存箱子的位置。暴力搜索能够,AC 代码:\n\n","draft":false,"createdAt":{"type":"json","json":"2017-10-18T01:26:50+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:3","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:5","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:6","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:7","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:8","typename":"Tag"}],"__typename":"Post"},"Category:3":{"id":3,"slug":"acm","name":"ACM","__typename":"Category"},"Tag:5":{"id":5,"slug":"%E6%8B%9B%E8%81%98","name":"招聘","__typename":"Tag"},"Tag:6":{"id":6,"slug":"%E7%BD%91%E6%98%93","name":"网易","__typename":"Tag"},"Tag:7":{"id":7,"slug":"lcs","name":"LCS","__typename":"Tag"},"Tag:8":{"id":8,"slug":"%E6%9A%B4%E5%8A%9B","name":"暴力","__typename":"Tag"},"Post:4":{"id":4,"title":"体验I3之美","slug":"beautifull-i3","excerpt":"![enter description here][1]\n先晒张日常桌面图。Gnome3 用了半年了一直被其蹩脚的交互和层出不穷的 Bug 所折磨。虽然 Gnome3 很漂亮,很简洁,但是毕竟漂亮不能当饭吃。套餐这种东西虽然简单省事,但是终究不是为你所量身定制的,总有其中一样不合你口味。因此,我决定再次抛弃“开箱即用”的 DE(Desktop Environment),在 WM(Window Manager)的基础上自己打造一套适合自己的桌面环境。\n\n","draft":false,"createdAt":{"type":"json","json":"2017-03-19T16:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:1","typename":"Category"},{"type":"id","generated":false,"id":"Category:5","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:9","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:10","typename":"Tag"}],"__typename":"Post"},"Category:5":{"id":5,"slug":"archlinux","name":"Archlinux","__typename":"Category"},"Tag:9":{"id":9,"slug":"gnome","name":"gnome","__typename":"Tag"},"Tag:10":{"id":10,"slug":"i3wm","name":"i3wm","__typename":"Tag"},"Post:5":{"id":5,"title":"GraphQL Learn (3) - Validation","slug":"graph-ql-learn-%283%29-validation","excerpt":"通过使用类型系统,可以预先确定 GraphQL 查询是否有效。 这样可以让服务器和客户端有效地通知开发人员在创建无效查询时,无需在运行时检查。\n\n对于我们的星球大战示例,文件[starWarsValidation-test.js](https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsValidation-test.js)包含许多无效的查询,可以用来测试当前实现的验证器。\n\n首先,我们来看一个复杂的有效查询。 这是一个嵌套查询,类似于上一节的一个示例,但将重复的字段分解成一个片段:\n\n","draft":false,"createdAt":{"type":"json","json":"2017-08-14T16:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:2","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:4","typename":"Tag"}],"__typename":"Post"},"Post:6":{"id":6,"title":"Basic Algorithms in Go","slug":"basic-algorithms-in-go","excerpt":"最近学 Go,感觉挺不错的。闲来无事用它写了几种常用的基础算法。\n\n## 快排\n\n思想很简单,实现起来为了方便每次以 left 作为基准,也可以使用 BFS 来节省递归栈:\n\n```golang\n// QuickSort returns a sorted slice\nfunc QuickSort(arr []int) {\n\tif len(arr) <= 1 {\n\t\treturn\n\t}\n\tleft, right := 0, len(arr)-1\n\tfor left < right {\n\t\tif arr[left+1] > arr[left] {\n\t\t\tarr[left+1], arr[right] = arr[right], arr[left+1]\n\t\t\tright--\n\t\t} else {\n\t\t\tarr[left+1], arr[left] = arr[left], arr[left+1]\n\t\t\tleft++\n\t\t}\n\t}\n\tQuickSort(arr[:left])\n\tQuickSort(arr[left+1:])\n}\n```\n\n","draft":false,"createdAt":{"type":"json","json":"2017-01-10T00:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:2","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:3","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:12","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:13","typename":"Tag"}],"__typename":"Post"},"User:2":{"id":2,"name":"Kevin Tan","email":"stkevintan@zju.edu.cn","bio":"Major in Typescript, Minor in Rust, C#","githubId":"5887203","__typename":"User"},"Tag:12":{"id":12,"slug":"algorithm","name":"algorithm","__typename":"Tag"},"Tag:13":{"id":13,"slug":"golang","name":"golang","__typename":"Tag"},"Post:7":{"id":7,"title":"GraphQL Learn (5) - Introspection","slug":"graph-ql-learn-%285%29-introspection","excerpt":"查询 GraphQL 架构有关它支持的查询的信息通常很有用。 GraphQL 允许我们使用内省系统来做到这一点!对于我们的星球大战例子来说,文件[starWarsIntrospection-test.js](https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsIntrospection-test.js)包含许多查询内省系统的查询,并且是一个完整的按照规范实现的测试文件。\n\n我们设计了类型系统,所以我们应该知道系统中可用的类型。但是如果不知道,我们还可以通过查询\\_\\_schema 字段来询问 GraphQL。这个字段始终存在于根类型中。\n\n","draft":false,"createdAt":{"type":"json","json":"2017-08-14T16:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:2","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:4","typename":"Tag"}],"__typename":"Post"},"Post:8":{"id":8,"title":"GraphQL Learn (2) - Schemas and Types","slug":"graph-ql-learn-%282%29-schemas-and-types","excerpt":"在此页面上,您将了解有关 GraphQL 类型系统的所有知识,以及如何描述可查询哪些数据。 由于 GraphQL 可以与任何后端框架或编程语言一起使用,因此我们将远离实现特定的详细信息,仅讨论概念。\n\n### 类型系统(Type System)\n\n如果您以前看过 GraphQL 查询,那么你应该知道 GraphQL 查询语言基本上是在对象上选择字段。 所以在以下查询中:\n\n```graphql\n{\n hero {\n name\n appearsIn\n }\n}\n```\n\n","draft":false,"createdAt":{"type":"json","json":"2017-08-14T16:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:2","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:4","typename":"Tag"}],"__typename":"Post"},"Post:9":{"id":9,"title":"JS DOM API分析","slug":"dom-compatibility-note","excerpt":"## Element.classList\n\n返回 DOMTokenList,IE version>=10 不完全支持。\n\n1. 不支持 classList.contains 的第二个参数(force)\n2. add 和 remove 方法不支持多参数\n3. SVG,MathML 结点没有 classList 属性\n\n","draft":false,"createdAt":{"type":"json","json":"2016-11-02T21:07:21+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:2","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:16","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:17","typename":"Tag"},{"type":"id","generated":false,"id":"Tag:18","typename":"Tag"}],"__typename":"Post"},"Tag:16":{"id":16,"slug":"javascirpt","name":"javascirpt","__typename":"Tag"},"Tag:17":{"id":17,"slug":"dom","name":"dom","__typename":"Tag"},"Tag:18":{"id":18,"slug":"html","name":"html","__typename":"Tag"},"Post:10":{"id":10,"title":"GraphQL Learn (4) - Execution","slug":"graph-ql-learn-%284%29-execution","excerpt":"经过验证,GraphQL 查询由 GraphQL 服务器执行,然后返回一个与查询形状相同的结果,通常为 JSON。\n\nGraphQL 无法执行没有类型系统的查询,让我们使用类型系统例子来说明执行查询,这个例子是我们教程中使用的类型系统中的一部分:\n\n```graphql\ntype Query {\n human(id: ID!): Human\n}\ntype Human {\n name: String\n appearsIn: [Episode]\n starships: [Starship]\n}\nenum Episode {\n NEWHOPE\n EMPIRE\n JEDI\n}\ntype Starship {\n name: String\n}\n```\n\n","draft":false,"createdAt":{"type":"json","json":"2017-08-14T16:00:00+00:00"},"updatedAt":{"type":"json","json":"2020-07-28T05:18:21+00:00"},"author":{"type":"id","generated":false,"id":"User:1","typename":"User"},"categories":[{"type":"id","generated":false,"id":"Category:2","typename":"Category"}],"tags":[{"type":"id","generated":false,"id":"Tag:4","typename":"Tag"}],"__typename":"Post"},"ROOT_QUERY":{"posts({\"orderBy\":{\"updatedAt\":\"desc\"},\"where\":{\"OR\":[{\"content\":{}},{\"title\":{}}],\"authorId\":{}}})":[{"type":"id","generated":false,"id":"Post:1","typename":"Post"},{"type":"id","generated":false,"id":"Post:2","typename":"Post"},{"type":"id","generated":false,"id":"Post:3","typename":"Post"},{"type":"id","generated":false,"id":"Post:4","typename":"Post"},{"type":"id","generated":false,"id":"Post:5","typename":"Post"},{"type":"id","generated":false,"id":"Post:6","typename":"Post"},{"type":"id","generated":false,"id":"Post:7","typename":"Post"},{"type":"id","generated":false,"id":"Post:8","typename":"Post"},{"type":"id","generated":false,"id":"Post:9","typename":"Post"},{"type":"id","generated":false,"id":"Post:10","typename":"Post"}]}}},"__N_SSG":true}