@@ -68,13 +68,15 @@ Execute GraphQL statements
6868
6969````
7070USAGE
71- $ sf api request graphql -o <value> --body file [--json] [--flags-dir <value>] [-S Example: report.xlsx | -i]
71+ $ sf api request graphql -o <value> --body file [--json] [--flags-dir <value>] [--api-version <value>] [-S Example:
72+ report.xlsx | -i]
7273
7374FLAGS
7475 -S, --stream-to-file=Example: report.xlsx Stream responses to a file.
7576 -i, --include Include the HTTP response status and headers in the output.
7677 -o, --target-org=<value> (required) Username or alias of the target org. Not required if the
7778 `target-org` configuration variable is already set.
79+ --api-version=<value> Override the api version used for api requests made by this command
7880 --body=file (required) File or content with GraphQL statement. Specify "-" to read from
7981 standard input.
8082
@@ -90,7 +92,7 @@ DESCRIPTION
9092
9193EXAMPLES
9294 - Runs the graphql query directly via the command line
93- sf api request graphql --body '{ "query": "query accounts { uiapi { query { Account { edges { node { Id \n Name { value } } } } } } }" }'
95+ sf api request graphql --body "query accounts { uiapi { query { Account { edges { node { Id \n Name { value } } } } } } }"
9496 - Runs a mutation to create an Account, with an `example.txt` file, containing
9597 ```text
9698 mutation AccountExample{
@@ -116,7 +118,7 @@ will create a new account returning specified fields (Id, Name)
116118
117119```
118120
119- _See code: [src/commands/api/request/graphql.ts](https://github.com/salesforcecli/plugin-api/blob/v1.1 .0/src/commands/api/request/graphql.ts)_
121+ _See code: [src/commands/api/request/graphql.ts](https://github.com/salesforcecli/plugin-api/blob/1.2 .0/src/commands/api/request/graphql.ts)_
120122
121123## `sf api request rest ENDPOINT`
122124
@@ -172,6 +174,6 @@ $ sf api request rest 'sobjects/account' --body info.json --method POST
172174
173175```
174176
175- _See code: [src/commands/api/request/rest.ts](https://github.com/salesforcecli/plugin-api/blob/v1.1 .0/src/commands/api/request/rest.ts)_
177+ _See code: [src/commands/api/request/rest.ts](https://github.com/salesforcecli/plugin-api/blob/1.2 .0/src/commands/api/request/rest.ts)_
176178<!-- commandsstop -->
177179```
0 commit comments