Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 34dc58d

Browse files
committed
Translate docs/third-party-graphql
1 parent cbb4adb commit 34dc58d

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

docs/docs/third-party-graphql.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
---
2-
title: Using Third-party GraphQL APIs
2+
title: サードパーティー製GraphQL APIの使用
33
---
44

5-
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.
5+
Gatsby v2 は、簡単な方法でどんな GraphQL API でも GatsbyGraphQL に統合できます。 たとえば、GitHub などのサードパーティー API、GraphCMS などサービスの API、あるいは独自の GraphQL API などです。
66

7-
## Basic example
7+
## 基本的な例
88

9-
First install the plugin.
9+
最初に、プラグインをインストールします。
1010

1111
```shell
1212
npm install gatsby-source-graphql
1313
```
1414

15-
Provided there is a GraphQL API under a `url`, adding it to an API just requires adding this to the config.
15+
`url`の下に GraphQL API がある場合、それを API に追加するには以下を設定に追加するだけです。
1616

1717
```js:title=gatsby-config.js
1818
module.exports = {
1919
plugins: [
2020
{
2121
resolve: "gatsby-source-graphql",
2222
options: {
23-
// This type will contain remote schema Query type
23+
// このタイプには、リモートスキーマのクエリタイプが含まれます
2424
typeName: "SWAPI",
25-
// This is the field under which it's accessible
25+
// これはアクセス可能なフィールドです
2626
fieldName: "swapi",
27-
// URL to query from
27+
// クエリ元のURLです
2828
url: "https://api.graphcms.com/simple/v1/swapi",
2929
},
3030
},
3131
],
3232
}
3333
```
3434

35-
See all configuration options in the [plugin docs](/packages/gatsby-source-graphql)
35+
すべての設定ファイルのオプションは[プラグインドキュメント](/packages/gatsby-source-graphql)をご覧ください。
3636

37-
Third-party APIs will be available under the `fieldName` specified, so you can query through it normally.
37+
サードパーティーの API は、指定された`fieldName`で使用できるため、通常どおりクエリを実行できます。
3838

3939
```graphql
4040
{
41-
# Field name parameter defines how you can access a third-party API
41+
# フィールド名パラメーターは、サードパーティーのAPIにアクセスする方法を指定します
4242
swapi {
4343
allSpecies {
4444
name
@@ -47,11 +47,11 @@ Third-party APIs will be available under the `fieldName` specified, so you can q
4747
}
4848
```
4949

50-
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.
50+
サードパーティー API のタイプには、`${typeName}_`という接頭辞が付きます。変数またはフラグメントを使用する場合などにも、接頭辞が必要です。
5151

5252
```graphql
5353
{
54-
# Field name parameter defines how you can access third-party API
54+
# フィールド名パラメーターは、サードパーティーAPIにアクセスする方法を指定します
5555
swapi {
5656
allSpecies {
5757
... on SWAPI_Species {
@@ -62,9 +62,9 @@ Note that types of the third-party API will be prefixed with `${typeName}_`. You
6262
}
6363
```
6464

65-
## Creating pages dynamically through third-party APIs
65+
## サードパーティー API を使用してページを動的に作成する
6666

67-
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.
67+
`gatsby-node.js``createPages`コールバックを追加して、ページを動的に作成することもできます。たとえば、スターウォーズに登場する全ての種族のページを作成できます。
6868

6969
```js:title=gatsby-node.js
7070
const path = require(`path`)
@@ -93,10 +93,10 @@ exports.createPages = async ({ actions, graphql }) => {
9393
}
9494
```
9595

96-
## Further reading
96+
## もっと詳しく
9797

98-
- [gatsby-source-graphql docs](/packages/gatsby-source-graphql)
99-
- [Example with GitHub API](https://github.com/freiksenet/gatsby-github-displayer)
100-
- [Example with GraphCMS](https://github.com/freiksenet/gatsby-graphcms)
101-
- [Example with Hasura](https://github.com/hasura/graphql-engine/tree/master/community/sample-apps/gatsby-postgres-graphql)
102-
- [Example with AWS AppSync](https://github.com/aws-samples/aws-appsync-gatsby-sample)
98+
- [gatsby-source-graphql ドキュメント](/packages/gatsby-source-graphql)
99+
- [GitHub API を使用した例](https://github.com/freiksenet/gatsby-github-displayer)
100+
- [GraphCMS を使用した例](https://github.com/freiksenet/gatsby-graphcms)
101+
- [Hasura を使用した例](https://github.com/hasura/graphql-engine/tree/master/community/sample-apps/gatsby-postgres-graphql)
102+
- [AWS AppSync を使用した例](https://github.com/aws-samples/aws-appsync-gatsby-sample)

0 commit comments

Comments
 (0)