本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
GraphQL 公用程式的命令列引數
-
--help, -h– 將 GraphQL 公用程式的說明文字傳回至主控台。 -
--input-schema– 要用作輸入的 GraphQL 結構描述 (含或不含指令)。(schema text) -
--input-schema-file– 檔案的 URL,此檔案包含要用作輸入的 GraphQL 結構描述。(file URL) -
--input-schema-changes-file– 檔案的 URL,此檔案包含您要對 GraphQL 結構描述進行的變更。如果您多次針對 Neptune 資料庫執行公用程式,並且還手動變更 GraphQL 來源結構描述,也許新增自訂查詢,您的手動變更將會失去。若要避免這種情況,請將您的變更放入變更檔案中,並使用此引數傳遞它。(file URL)變更檔案會使用下列 JSON 格式:
[ { "type": "(GraphQL type name)", "field": "(GraphQL field name)", "action": "(remove or add)", "value": "(value)" } ]如需詳細資訊,請參閱 Todo 範例。
-
--input-graphdb-schema– 您可以透過文字形式表示 graphdb 結構描述以用作輸入,而不是針對 Neptune 資料庫執行公用程式。graphdb 結構描述具有如下的 JSON 格式:(schema text){ "nodeStructures": [ { "label":"nodelabel1", "properties": [ { "name":"name1", "type":"type1" } ] }, { "label":"nodelabel2", "properties": [ { "name":"name2", "type":"type1" } ] } ], "edgeStructures": [ { "label":"label1", "directions": [ { "from":"nodelabel1", "to":"nodelabel2", "relationship":"ONE-ONE|ONE-MANY|MANY-MANY" } ], "properties": [ { "name":"name1", "type":"type1" } ] } ] } -
--input-graphdb-schema-file– 您可以將 graphdb 結構描述儲存在要用作輸入的檔案中,而不是針對 Neptune 資料庫執行公用程式。如需 graphdb 結構描述檔案的 JSON 格式範例,請參閱上述(file URL)--input-graphdb-schema。 -
--input-graphdb-schema-neptune-endpoint– 公用程式應從中擷取 graphdb 結構描述的 Neptune 資料庫端點。(endpoint URL) -
--output-schema-file– GraphQL 結構描述的輸出檔案名稱。如果未指定,則預設值為(file name)output.schema.graphql,除非已使用--create-update-aws-pipeline-name設定管道名稱,在此情況下預設檔案名稱為。(pipline name).schema.graphql -
--output-source-schema-file– GraphQL 結構描述 (含指令) 的輸出檔案名稱。如果未指定,則預設值為(file name)output.source.schema.graphql,除非已使用--create-update-aws-pipeline-name設定管道名稱,在此情況下預設名稱為。(pipeline name).source.schema.graphql -
--output-schema-no-mutations– 如果存在此引數,則公用程式不會在 GraphQL API 中產生任何變動,只會產生查詢。 -
--output-neptune-schema-file– 公用程式探索的 Neptune graphdb 結構描述的輸出檔案名稱。如果未指定,則預設值為(file name)output.graphdb.json,除非已使用--create-update-aws-pipeline-name設定管道名稱,在此情況下預設檔案名稱為。(pipeline name).graphdb.json -
--output-js-resolver-file– 解析程式碼副本的輸出檔案名稱。如果未指定,則預設值為(file name)output.resolver.graphql.js,除非已使用--create-update-aws-pipeline-name設定管道名稱,在此情況下檔案名稱為。(pipeline name).resolver.graphql.js此檔案會壓縮在程式碼套件中,此程式碼套件會上傳至執行解析程式的 Lambda 函數。
-
--output-resolver-query-sdk– 此引數指定公用程式的 Lambda 函數應該使用 Neptune 資料 SDK 查詢 Neptune,該 SDK 已從 Neptune 引擎版本 1.2.1.0.R5 開始可供使用 (這是預設值)。不過,如果公用程式偵測到較舊的 Neptune 引擎版本,則其會建議改用 HTTPS Lambda 選項,您可以使用--output-resolver-query-https引數調用該選項。 -
--output-resolver-query-https– 此引數指定公用程式的 Lambda 函數應該使用 Neptune HTTPS API 查詢 Neptune。 -
--create-update-aws-pipeline– 此引數會觸發建立資源以供 AWS GraphQL API 使用,包括 AppSync GraphQL API 和執行解析程式的 Lambda。 -
--create-update-aws-pipeline-name– 此引數會設定管道的名稱,例如 AppSync 的(pipeline name)pipeline-nameAPI 或 Lambda 函數的pipeline-name函數。如果未指定名稱,則--create-update-aws-pipeline會使用Neptune資料庫名稱。 -
--create-update-aws-pipeline-region– 此引數會設定在其中建立 GraphQL API 管道 AWS 的區域。如果未指定,則預設區域為(AWS region)us-east-1或 Neptune 資料庫所在的區域 (從資料庫端點擷取的區域)。 -
--create-update-aws-pipeline-neptune-endpoint– 此引數會設定 Lambda 函數用來查詢資料庫的 Neptune 資料庫端點。如果未設定,則會使用(endpoint URL)--input-graphdb-schema-neptune-endpoint所設定的端點。 -
--remove-aws-pipeline-name– 此引數會移除使用(pipeline name)--create-update-aws-pipeline建立的管道。要移除的資源會列示在名為的檔案中。(pipeline name).resources.json -
--output-aws-pipeline-cdk– 此引數會觸發建立 CDK 檔案,此檔案可以用來為 GraphQL API 建立 AWS 資源,包括 AppSync GraphQL API 和執行解析程式的 Lambda 函數。 -
--output-aws-pipeline-cdk-neptume-endpoint– 此引數會設定 Lambda 函數用來查詢 Neptune 資料庫的 Neptune 資料庫端點。如果未設定,則會使用(endpoint URL)--input-graphdb-schema-neptune-endpoint所設定的端點。 -
--output-aws-pipeline-cdk-name– 此引數會設定管道名稱,供 AppSync API 和 Lambda pipeline-name 函數使用。如果未指定,則(pipeline name)--create-update-aws-pipeline會使用 Neptune 資料庫名稱。 -
--output-aws-pipeline-cdk-region– 這會設定在其中建立 GraphQL API 管道 AWS 的區域。如果未指定,則其會預設為(AWS region)us-east-1或 Neptune 資料庫所在的區域 (從資料庫端點擷取的區域)。 -
--output-aws-pipeline-cdk-file– 這會設定 CDK 檔案名稱。如果未設定,則預設值為(file name)。(pipeline name)-cdk.js