sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
29 lines (24 loc) • 632 B
text/typescript
import {
type CliCommandArguments,
type CliCommandContext,
type CliCommandDefinition,
} from '@sanity/cli'
const helpText = `
Examples
sanity graphql list
`
const listGraphQLAPIsCommand: CliCommandDefinition = {
name: 'list',
signature: '',
group: 'graphql',
description: 'Lists all the GraphQL endpoints deployed for this project',
action: async (
args: CliCommandArguments<Record<string, unknown>>,
context: CliCommandContext,
) => {
const mod = await import('../../actions/graphql/listApisAction')
return mod.default(args, context)
},
helpText,
}
export default listGraphQLAPIsCommand