From 7bd3438cbacd00e7e1346ac11f1da9a5b6d22302 Mon Sep 17 00:00:00 2001 From: LilPacy Date: Sun, 19 Jan 2020 01:38:23 +0900 Subject: [PATCH 01/14] Translate docs/third-party-graphql --- docs/docs/third-party-graphql.md | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 723e7db95..d0125d72d 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -1,18 +1,18 @@ --- -title: Using Third-party GraphQL APIs +title: サードパーティー製GraphQL APIの使用 --- -Gatsby v2 introduces a simple way to integrate any GraphQL API into Gatsby's GraphQL. You can integrate both third-party APIs, like GitHub's, APIs of services like GraphCMS or your custom GraphQL API. +Gatsby v2 は、簡単な方法でどんな GraphQL API でも Gatsby の GraphQL に統合できます。 たとえば、GitHub などのサードパーティー API、GraphCMS などのサービスの API、あるいは独自の GraphQL API などです。 -## Basic example +## 基本的な例 -First install the plugin. +最初に、プラグインをインストールします。 ```shell npm install gatsby-source-graphql ``` -Provided there is a GraphQL API under a `url`, adding it to an API just requires adding this to the config. +`url`の下に GraphQL API がある場合、それを API に追加するには以下を設定に追加するだけです。 ```js:title=gatsby-config.js module.exports = { @@ -20,11 +20,11 @@ module.exports = { { resolve: "gatsby-source-graphql", options: { - // This type will contain remote schema Query type + // このタイプには、リモートスキーマのクエリタイプが含まれます typeName: "SWAPI", - // This is the field under which it's accessible + // これはアクセス可能なフィールドです fieldName: "swapi", - // URL to query from + // クエリ元のURLです url: "https://api.graphcms.com/simple/v1/swapi", }, }, @@ -32,13 +32,13 @@ module.exports = { } ``` -See all configuration options in the [plugin docs](/packages/gatsby-source-graphql) +すべての設定ファイルのオプションは[プラグインドキュメント](/packages/gatsby-source-graphql)をご覧ください。 -Third-party APIs will be available under the `fieldName` specified, so you can query through it normally. +サードパーティーの API は、指定された`fieldName`で使用できるため、通常どおりクエリを実行できます。 ```graphql { - # Field name parameter defines how you can access a third-party API + # フィールド名パラメーターは、サードパーティーのAPIにアクセスする方法を指定します swapi { allSpecies { name @@ -47,11 +47,11 @@ Third-party APIs will be available under the `fieldName` specified, so you can q } ``` -Note that types of the third-party API will be prefixed with `${typeName}_`. You need to prefix it too, e.g. when using variables or fragments. +サードパーティー API のタイプには、`${typeName}_`という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 ```graphql { - # Field name parameter defines how you can access third-party API + # フィールド名パラメーターは、サードパーティーAPIにアクセスする方法を指定します swapi { allSpecies { ... on SWAPI_Species { @@ -62,9 +62,9 @@ Note that types of the third-party API will be prefixed with `${typeName}_`. You } ``` -## Creating pages dynamically through third-party APIs +## サードパーティー API を使用してページを動的に作成する -You can also create pages dynamically by adding a `createPages` callback in `gatsby-node.js`. For example you can create a page for every Star Wars species. +`gatsby-node.js`に`createPages`コールバックを追加して、ページを動的に作成することもできます。たとえば、スターウォーズに登場する全ての種族のページを作成できます。 ```js:title=gatsby-node.js const path = require(`path`) @@ -93,10 +93,10 @@ exports.createPages = async ({ actions, graphql }) => { } ``` -## Further reading +## もっと詳しく -- [gatsby-source-graphql docs](/packages/gatsby-source-graphql) -- [Example with GitHub API](https://github.com/freiksenet/gatsby-github-displayer) -- [Example with GraphCMS](https://github.com/freiksenet/gatsby-graphcms) -- [Example with Hasura](https://github.com/hasura/graphql-engine/tree/master/community/sample-apps/gatsby-postgres-graphql) -- [Example with AWS AppSync](https://github.com/aws-samples/aws-appsync-gatsby-sample) +- [gatsby-source-graphql ドキュメント](/packages/gatsby-source-graphql) +- [GitHub API を使用した例](https://github.com/freiksenet/gatsby-github-displayer) +- [GraphCMS を使用した例](https://github.com/freiksenet/gatsby-graphcms) +- [Hasura を使用した例](https://github.com/hasura/graphql-engine/tree/master/community/sample-apps/gatsby-postgres-graphql) +- [AWS AppSync を使用した例](https://github.com/aws-samples/aws-appsync-gatsby-sample) From d06e27724e7271599f1ecbdb80e805073c67df88 Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:18:46 +0900 Subject: [PATCH 02/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index d0125d72d..d38a707ce 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -12,7 +12,7 @@ Gatsby v2 は、簡単な方法でどんな GraphQL API でも Gatsby の GraphQ npm install gatsby-source-graphql ``` -`url`の下に GraphQL API がある場合、それを API に追加するには以下を設定に追加するだけです。 +`url` の下に GraphQL API がある場合、それを API に追加するには以下を設定に追加するだけです。 ```js:title=gatsby-config.js module.exports = { From 627f702dfa91129e6336a7b8e48d9a4a9266e61e Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:18:54 +0900 Subject: [PATCH 03/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index d38a707ce..3f11141c7 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -24,7 +24,7 @@ module.exports = { typeName: "SWAPI", // これはアクセス可能なフィールドです fieldName: "swapi", - // クエリ元のURLです + // クエリ元の URL です url: "https://api.graphcms.com/simple/v1/swapi", }, }, From 57a794242617f7277dad391c4d1d57d6b4fff925 Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:19:10 +0900 Subject: [PATCH 04/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 3f11141c7..3a0008fc8 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -34,7 +34,7 @@ module.exports = { すべての設定ファイルのオプションは[プラグインドキュメント](/packages/gatsby-source-graphql)をご覧ください。 -サードパーティーの API は、指定された`fieldName`で使用できるため、通常どおりクエリを実行できます。 +サードパーティーの API は、指定された `fieldName` で使用できるため、通常どおりクエリを実行できます。 ```graphql { From 2e97e6ac63088c023c76ed26159eda8109d9c1c2 Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:19:18 +0900 Subject: [PATCH 05/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 3a0008fc8..60ca520c5 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -38,7 +38,7 @@ module.exports = { ```graphql { - # フィールド名パラメーターは、サードパーティーのAPIにアクセスする方法を指定します + # フィールド名パラメーターは、サードパーティーの API にアクセスする方法を指定します swapi { allSpecies { name From 5d45c85d5bd0d15372814e7f3747ddea8e4ea8a6 Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:19:25 +0900 Subject: [PATCH 06/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 60ca520c5..71551a2d2 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -47,7 +47,7 @@ module.exports = { } ``` -サードパーティー API のタイプには、`${typeName}_`という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 +サードパーティー API のタイプには、 `${typeName}_` という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 ```graphql { From 595aff61b18f2be07a0e876b09aef12602f96db7 Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:19:36 +0900 Subject: [PATCH 07/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 71551a2d2..7d7c971d6 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -51,7 +51,7 @@ module.exports = { ```graphql { - # フィールド名パラメーターは、サードパーティーAPIにアクセスする方法を指定します + # フィールド名パラメーターは、サードパーティー API にアクセスする方法を指定します swapi { allSpecies { ... on SWAPI_Species { From 386a6d9d3feebcfcdf02d715c545fee521ee7642 Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:19:43 +0900 Subject: [PATCH 08/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 7d7c971d6..ca3d55b66 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -64,7 +64,7 @@ module.exports = { ## サードパーティー API を使用してページを動的に作成する -`gatsby-node.js`に`createPages`コールバックを追加して、ページを動的に作成することもできます。たとえば、スターウォーズに登場する全ての種族のページを作成できます。 +`gatsby-node.js` に `createPages` コールバックを追加して、ページを動的に作成することもできます。たとえば、スターウォーズに登場する全ての種族のページを作成できます。 ```js:title=gatsby-node.js const path = require(`path`) From 1c6b17b4de249ec80cda8a9b926c2c66cebae308 Mon Sep 17 00:00:00 2001 From: pacy Date: Sun, 19 Jan 2020 12:58:35 +0900 Subject: [PATCH 09/14] Update docs/docs/third-party-graphql.md Co-Authored-By: BSKY --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index ca3d55b66..60cc567e9 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -47,7 +47,7 @@ module.exports = { } ``` -サードパーティー API のタイプには、 `${typeName}_` という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 +サードパーティー API のタイプには、`${typeName}_` という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 ```graphql { From 235fdb3eda663d3647db93591ae83aefeddb34ef Mon Sep 17 00:00:00 2001 From: LilPacy Date: Sun, 19 Jan 2020 14:01:55 +0900 Subject: [PATCH 10/14] add space between full-width and half-width char --- docs/docs/third-party-graphql.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 60cc567e9..da2fb7c94 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -1,8 +1,8 @@ --- -title: サードパーティー製GraphQL APIの使用 +title: サードパーティー GraphQL APIの使用 --- -Gatsby v2 は、簡単な方法でどんな GraphQL API でも Gatsby の GraphQL に統合できます。 たとえば、GitHub などのサードパーティー API、GraphCMS などのサービスの API、あるいは独自の GraphQL API などです。 +Gatsby v2 は、簡単な方法でどんな GraphQL API でも Gatsby の GraphQL に統合できます。 たとえば、GitHub などのサードパーティー API 、 GraphCMS などのサービスの API 、あるいは独自の GraphQL API などです。 ## 基本的な例 @@ -47,7 +47,7 @@ module.exports = { } ``` -サードパーティー API のタイプには、`${typeName}_` という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 +サードパーティー API のタイプには、 `${typeName}_` という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 ```graphql { From fa4dea7095df166fd6afcea08124af3be0e62f5a Mon Sep 17 00:00:00 2001 From: pacy Date: Sat, 25 Jan 2020 16:16:59 +0900 Subject: [PATCH 11/14] Update docs/docs/third-party-graphql.md Co-Authored-By: Jesse Katsumata --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index da2fb7c94..cb8d5f3de 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -2,7 +2,7 @@ title: サードパーティー GraphQL APIの使用 --- -Gatsby v2 は、簡単な方法でどんな GraphQL API でも Gatsby の GraphQL に統合できます。 たとえば、GitHub などのサードパーティー API 、 GraphCMS などのサービスの API 、あるいは独自の GraphQL API などです。 +Gatsby v2 では、プラグイン一つでどんな GraphQL API でも Gatsby の GraphQL に統合できます。これは、GitHub などのサードパーティー API、GraphCMS などのサービスの API、あるいは独自の GraphQL API なども含みます。 ## 基本的な例 From 85ed510896986bc17bb758f2af72aa527297f297 Mon Sep 17 00:00:00 2001 From: pacy Date: Sat, 25 Jan 2020 16:17:11 +0900 Subject: [PATCH 12/14] Update docs/docs/third-party-graphql.md Co-Authored-By: Jesse Katsumata --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index cb8d5f3de..d0543fda3 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -47,7 +47,7 @@ module.exports = { } ``` -サードパーティー API のタイプには、 `${typeName}_` という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 +サードパーティー API のタイプには、`${typeName}_` という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。 ```graphql { From f52191a6a47ba16b35f9d7a703799b860b219621 Mon Sep 17 00:00:00 2001 From: pacy Date: Sat, 25 Jan 2020 16:17:27 +0900 Subject: [PATCH 13/14] Update docs/docs/third-party-graphql.md Co-Authored-By: Jesse Katsumata --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index d0543fda3..8b2f51ef9 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -64,7 +64,7 @@ module.exports = { ## サードパーティー API を使用してページを動的に作成する -`gatsby-node.js` に `createPages` コールバックを追加して、ページを動的に作成することもできます。たとえば、スターウォーズに登場する全ての種族のページを作成できます。 +`gatsby-node.js` に `createPages` コールバックを追加して、ページを動的に作成することもできます。たとえば、下記の例ではスターウォーズに登場する全ての種族のページを作成できます。 ```js:title=gatsby-node.js const path = require(`path`) From ae8fd71bce6f9f8afcafb1a392be71c9e54308ab Mon Sep 17 00:00:00 2001 From: LilPacy Date: Sat, 25 Jan 2020 22:43:16 +0900 Subject: [PATCH 14/14] =?UTF-8?q?=E7=AE=97=E7=94=A8=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E3=81=B8=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/third-party-graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-graphql.md b/docs/docs/third-party-graphql.md index 8b2f51ef9..b0699f53a 100644 --- a/docs/docs/third-party-graphql.md +++ b/docs/docs/third-party-graphql.md @@ -2,7 +2,7 @@ title: サードパーティー GraphQL APIの使用 --- -Gatsby v2 では、プラグイン一つでどんな GraphQL API でも Gatsby の GraphQL に統合できます。これは、GitHub などのサードパーティー API、GraphCMS などのサービスの API、あるいは独自の GraphQL API なども含みます。 +Gatsby v2 では、プラグイン 1 つでどんな GraphQL API でも Gatsby の GraphQL に統合できます。これは、GitHub などのサードパーティー API、GraphCMS などのサービスの API、あるいは独自の GraphQL API なども含みます。 ## 基本的な例