diff --git a/README.md b/README.md index 7d29f57e..82cefc3c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ $ npm install -g @salesforce/cli $ sf COMMAND running command... $ sf (--version|-v) -@salesforce/cli/2.57.5 linux-x64 node-v20.16.0 +@salesforce/cli/2.57.6 linux-x64 node-v20.16.0 $ sf --help [COMMAND] USAGE $ sf COMMAND @@ -851,7 +851,7 @@ _See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-ape Execute GraphQL statements -```` +``` USAGE $ sf api request graphql -o --body file [--json] [--flags-dir ] [--api-version ] [-S Example: report.xlsx | -i] @@ -879,117 +879,103 @@ EXAMPLES - Runs the graphql query directly via the command line sf api request graphql --body "query accounts { uiapi { query { Account { edges { node { Id \n Name { value } } } } } } }" - Runs a mutation to create an Account, with an `example.txt` file, containing - ```text - mutation AccountExample{ - uiapi { - AccountCreate(input: { - Account: { - Name: "Trailblazer Express" - } - }) { - Record { - Id - Name { - value + mutation AccountExample{ + uiapi { + AccountCreate(input: { + Account: { + Name: "Trailblazer Express" + } + }) { + Record { + Id + Name { + value + } } } } } - } -```` - -$ sf api request graphql --body example.txt -will create a new account returning specified fields (Id, Name) - + $ sf api request graphql --body example.txt + will create a new account returning specified fields (Id, Name) ``` -_See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.0/src/commands/api/request/graphql.ts)_ +_See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.1/src/commands/api/request/graphql.ts)_ ## `sf api request rest ENDPOINT` Make an authenticated HTTP request to Salesforce REST API and print the response. ``` - USAGE -$ sf api request rest ENDPOINT -o [--flags-dir ] [--api-version ] [-i | -S Example: -report.xlsx] [-X GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE] [-H key:value...] [--body file] + $ sf api request rest ENDPOINT -o [--flags-dir ] [--api-version ] [-i | -S Example: + report.xlsx] [-X GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE] [-H key:value...] [--body file] ARGUMENTS -ENDPOINT Salesforce API endpoint + ENDPOINT Salesforce API endpoint FLAGS --H, --header=key:value... HTTP header in "key:value" format. --S, --stream-to-file=Example: report.xlsx Stream responses to a file. --X, --method=