Skip to content

Commit

Permalink
docs: upgrade to vuepress 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Nov 8, 2019
1 parent 7187f05 commit f7d1ff3
Show file tree
Hide file tree
Showing 6 changed files with 616 additions and 2,579 deletions.
14 changes: 11 additions & 3 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ module.exports = {
description: '🚀 在你的 Vue.js 应用中集成 GraphQL!',
}
},
plugins: {
'@vuepress/pwa': {
serviceWorker: true,
updatePopup: {
'/': {
message: "New content is available.",
buttonText: "Refresh"
},
},
},
},
themeConfig: {
repo: 'Akryum/vue-apollo',
docsDir: 'docs',
editLinks: true,
serviceWorker: {
updatePopup: true,
},
locales: {
'/': {
selectText: 'Languages',
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/guide/components/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Fragments are useful to share parts of GraphQL documents in other documents to r

Let's say we have this `GetMessages` query with a `messages` field that is an array of `Message` objects:

```gql
```graphql
query GetMessages {
messages {
id
Expand Down Expand Up @@ -260,7 +260,7 @@ export default {

Here is what the `message` fragment, which is applied on the `Message` type, looks like:

```gql
```graphql
fragment message on Message {
id
user {
Expand Down Expand Up @@ -307,7 +307,7 @@ gql`

Which will effectively produce this GraphQL document (that you can try on the GraphQL playground of your API):

```gql
```graphql
query GetMessages {
messages {
...message
Expand All @@ -328,7 +328,7 @@ So what's happening here? GraphQL will find the `...` operator where we usually

In the end, we obtain the final query:

```gql
```graphql
query GetMessages {
messages {
id
Expand Down
8 changes: 4 additions & 4 deletions docs/zh-cn/guide/components/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export default {

假设我们有一个`GetMessages` 查询,带有一个类型是 `Message` 对象数组的 `messages` 字段:

```gql
```graphql
query GetMessages {
messages {
id
Expand Down Expand Up @@ -261,7 +261,7 @@ export default {

以下是应用于 `Message` 类型的 `message` 片段,如下所示:

```gql
```graphql
fragment message on Message {
id
user {
Expand Down Expand Up @@ -308,7 +308,7 @@ gql`

这将有效地生成 GraphQL 文档(你可以在你的 GraphQL API playground 上尝试):

```gql
```graphql
query GetMessages {
messages {
...message
Expand All @@ -329,7 +329,7 @@ fragment message on Message {

最后,我们获得最终查询:

```gql
```graphql
query GetMessages {
messages {
id
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"docs:build": "vuepress build docs"
},
"devDependencies": {
"vuepress": "^0.14.2"
"@vuepress/plugin-pwa": "^1.0.2",
"vuepress": "^1.2.0"
}
}
Loading

0 comments on commit f7d1ff3

Please sign in to comment.