-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] GraphQL: Add a tag option when interacting with GraphQL endpoi…
…nts (#1606)
- Loading branch information
Showing
4 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 13 additions & 1 deletion
14
packages/@sanity/core/src/commands/graphql/deleteGraphQLAPICommand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
import lazyRequire from '@sanity/util/lib/lazyRequire' | ||
|
||
const helpText = ` | ||
Options | ||
--dataset <dataset> Delete GraphQL API for the given dataset | ||
--tag <tag> Delete GraphQL API for the given tag (defaults to 'default') | ||
Examples | ||
sanity graphql undeploy | ||
sanity graphql undeploy --dataset staging | ||
sanity graphql undeploy --dataset staging --tag next | ||
` | ||
|
||
export default { | ||
name: 'undeploy', | ||
group: 'graphql', | ||
description: 'Remove a deployed GraphQL API', | ||
action: lazyRequire(require.resolve('../../actions/graphql/deleteApiAction')) | ||
action: lazyRequire(require.resolve('../../actions/graphql/deleteApiAction')), | ||
helpText | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters