Skip to content

Commit

Permalink
[core] GraphQL: Tweak feedback from CLI when deleting and deploying G…
Browse files Browse the repository at this point in the history
…raphQL endpoints
  • Loading branch information
saasen committed Feb 27, 2020
1 parent 6079049 commit 37346a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@sanity/core/src/actions/graphql/deleteApiAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = async function deleteApiAction(args, context) {

const confirmMessage =
tag === 'default'
? 'Are you absolutely sure you want to delete the current GraphQL API?'
: `Are you absolutely sure you want to delete the GraphQL API tagged "${tag}"?`
? `Are you absolutely sure you want to delete the current GraphQL API connected to the "${dataset}" dataset?`
: `Are you absolutely sure you want to delete the GraphQL API connected to the "${dataset}" dataset, tagged "${tag}"?`

if (
!(await prompt.single({
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/core/src/actions/graphql/deployApiAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ module.exports = async function deployApiActions(args, context) {
throw new Error(`Unknown API generation "${generation}"`)
}

context.output.print(`Dataset: ${dataset}`)
context.output.print(`Tag: ${tag}\n`)

spinner = output.spinner('Checking for deployed API').start()
const currentGeneration = await getUrlHeaders(client.getUrl(`/apis/graphql/${dataset}/${tag}`), {
Authorization: `Bearer ${client.config().token}`
Expand Down

0 comments on commit 37346a7

Please sign in to comment.