UNPKG

@graphql-hive/cli

Version:

A CLI util to manage and control your GraphQL Hive

1,061 lines • 33.8 kB
{ "commands": { "dev": { "aliases": [], "args": {}, "description": "Develop and compose Supergraph with your local services.\nOnly available for Federation projects.\n\nTwo modes are available:\n 1. Local mode (default): Compose provided services locally. (Uses Hive's native Federation v2 composition)\n 2. Remote mode: Perform composition remotely (according to project settings) using all services registered in the registry.\n\nWork in Progress: Please note that this command is still under development and may undergo changes in future releases", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "registry.endpoint": { "dependsOn": [ "remote" ], "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry": { "dependsOn": [ "remote" ], "deprecated": { "message": "use --registry.endpoint instead", "version": "0.21.0" }, "description": "registry address (deprecated in favor of --registry.endpoint)", "name": "registry", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "dependsOn": [ "remote" ], "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "token": { "dependsOn": [ "remote" ], "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "api token (deprecated in favor of --registry.accessToken)", "name": "token", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "service": { "description": "Service name", "name": "service", "required": true, "hasDynamicHelp": false, "helpValue": "<string>", "multiple": true, "type": "option" }, "url": { "dependsOn": [ "service" ], "description": "Service url", "name": "url", "required": true, "hasDynamicHelp": false, "helpValue": "<address>", "multiple": true, "type": "option" }, "schema": { "dependsOn": [ "service" ], "description": "Service sdl. If not provided, will be introspected from the service", "name": "schema", "hasDynamicHelp": false, "helpValue": "<filepath>", "multiple": true, "type": "option" }, "watch": { "description": "Watch mode", "name": "watch", "allowNo": false, "type": "boolean" }, "watchInterval": { "description": "Watch interval in milliseconds", "name": "watchInterval", "default": 1000, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "write": { "description": "Where to save the supergraph schema file", "name": "write", "default": "supergraph.graphql", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "remote": { "description": "Compose provided services remotely", "name": "remote", "allowNo": false, "type": "boolean" }, "unstable__forceLatest": { "dependsOn": [ "remote" ], "description": "Force the command to use the latest version of the CLI, not the latest composable version.", "hidden": true, "name": "unstable__forceLatest", "allowNo": false, "type": "boolean" }, "target": { "description": "The target to use for composition (slug or ID). This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "dev", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "dev.js" ] }, "introspect": { "aliases": [], "args": { "location": { "description": "GraphQL Schema location (URL or file path/glob)", "hidden": false, "name": "location", "required": true } }, "description": "introspects a GraphQL Schema", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "write": { "aliases": [ "W" ], "description": "Write to a file (possible extensions: .graphql, .gql, .gqls, .graphqls, .json)", "name": "write", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "header": { "aliases": [ "H" ], "description": "HTTP header to add to the introspection request (in key:value format)", "name": "header", "hasDynamicHelp": false, "multiple": true, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "introspect", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "introspect.js" ] }, "whoami": { "aliases": [], "args": {}, "description": "shows information about the current token", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry": { "deprecated": { "message": "use --registry.endpoint instead", "version": "0.21.0" }, "description": "registry address", "name": "registry", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "token": { "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "api token", "name": "token", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "whoami", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "whoami.js" ] }, "app:create": { "aliases": [], "args": { "file": { "description": "Path to the persisted operations mapping.", "hidden": false, "name": "file", "required": true } }, "description": "create an app deployment", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "description": "app name", "name": "name", "required": true, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "version": { "description": "app version", "name": "version", "required": true, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "target": { "description": "The target in which the app deployment will be created. This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "app:create", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "app", "create.js" ] }, "app:publish": { "aliases": [], "args": {}, "description": "publish an app deployment", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "description": "app name", "name": "name", "required": true, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "version": { "description": "app version", "name": "version", "required": true, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "target": { "description": "The target in which the app deployment will be published (slug or ID). This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "app:publish", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "app", "publish.js" ] }, "artifact:fetch": { "aliases": [], "args": {}, "description": "fetch artifacts from the CDN", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "cdn.endpoint": { "description": "CDN endpoint", "name": "cdn.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "cdn.accessToken": { "description": "CDN access token", "name": "cdn.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "artifact": { "description": "artifact to fetch (Note: supergraph is only available for federation projects)", "name": "artifact", "required": true, "hasDynamicHelp": false, "multiple": false, "options": [ "sdl", "supergraph", "metadata", "services", "sdl.graphql", "sdl.graphqls" ], "type": "option" }, "outputFile": { "description": "whether to write to a file instead of stdout", "name": "outputFile", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "artifact:fetch", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "artifact", "fetch.js" ] }, "operations:check": { "aliases": [], "args": { "file": { "description": "Glob pattern to find the operations", "hidden": false, "name": "file", "required": true } }, "description": "checks operations against a published schema", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry": { "deprecated": { "message": "use --registry.endpoint instead", "version": "0.21.0" }, "description": "registry address", "name": "registry", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "token": { "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "api token", "name": "token", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "require": { "description": "Loads specific require.extensions before running the command", "name": "require", "default": [], "hasDynamicHelp": false, "multiple": true, "type": "option" }, "graphqlTag": { "description": "Identify template literals containing GraphQL queries in JavaScript/TypeScript code. Supports multiple values.\nExamples:\n --graphqlTag graphql-tag (Equivalent to: import gqlTagFunction from \"graphql-tag\")\n --graphqlTag graphql:react-relay (Equivalent to: import { graphql } from \"react-relay\")", "name": "graphqlTag", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "globalGraphqlTag": { "description": "Allows to use a global identifier instead of a module import. Similar to --graphqlTag.\nExamples:\n --globalGraphqlTag gql (Supports: export const meQuery = gql`{ me { id } }`)\n --globalGraphqlTag graphql (Supports: export const meQuery = graphql`{ me { id } }`)", "name": "globalGraphqlTag", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "apolloClient": { "description": "Supports Apollo Client specific directives", "name": "apolloClient", "allowNo": false, "type": "boolean" }, "target": { "description": "The target to which to check agains (slug or ID). This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "operations:check", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "operations", "check.js" ] }, "schema:check": { "aliases": [], "args": { "file": { "description": "Path to the schema file(s)", "hidden": false, "name": "file", "required": true } }, "description": "checks schema", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "service": { "description": "service name (only for distributed schemas)", "name": "service", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry": { "deprecated": { "message": "use --registry.endpoint instead", "version": "0.21.0" }, "description": "registry address", "name": "registry", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "token": { "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "api token", "name": "token", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "experimentalJsonFile": { "description": "File path to output a JSON file containing the command's result. Useful for e.g. CI scripting with `jq`.", "name": "experimentalJsonFile", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "forceSafe": { "description": "mark the check as safe, breaking changes are expected", "name": "forceSafe", "allowNo": false, "type": "boolean" }, "github": { "description": "Connect with GitHub Application", "name": "github", "allowNo": false, "type": "boolean" }, "require": { "description": "Loads specific require.extensions before running the codegen and reading the configuration", "name": "require", "default": [], "hasDynamicHelp": false, "multiple": true, "type": "option" }, "author": { "description": "Author of the change", "name": "author", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "commit": { "description": "Associated commit sha", "name": "commit", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "contextId": { "description": "Context ID for grouping the schema check.", "name": "contextId", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "target": { "description": "The target against which to check the schema (slug or ID). This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "url": { "description": "If checking a service, then you can optionally provide the service URL to see the difference in the supergraph during the check.", "name": "url", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "schema:check", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "schema", "check.js" ] }, "schema:delete": { "aliases": [], "args": { "service": { "description": "name of the service", "hidden": false, "name": "service", "required": true } }, "description": "deletes a schema", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry": { "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "registry address", "name": "registry", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "token": { "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "api token", "name": "token", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "dryRun": { "description": "Does not delete the service, only reports what it would have done.", "name": "dryRun", "allowNo": false, "type": "boolean" }, "confirm": { "description": "Confirm deletion of the service", "name": "confirm", "allowNo": false, "type": "boolean" }, "target": { "description": "The target to which to publish to (slug or ID). This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "schema:delete", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "schema", "delete.js" ] }, "schema:fetch": { "aliases": [], "args": { "actionId": { "description": "action id (e.g. commit sha)", "hidden": false, "name": "actionId" } }, "description": "fetch a schema, supergraph, or list of subgraphs from the Hive API", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "registry": { "deprecated": { "message": "use --registry.endpoint instead", "version": "0.21.0" }, "description": "registry address", "name": "registry", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "token": { "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "api token", "name": "token", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "type": { "aliases": [ "T" ], "description": "Type to fetch (possible types: sdl, supergraph, subgraphs)", "name": "type", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "write": { "aliases": [ "W" ], "description": "Write to a file (possible extensions: .graphql, .gql, .gqls, .graphqls)", "name": "write", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "outputFile": { "description": "whether to write to a file instead of stdout", "name": "outputFile", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "target": { "description": "The target from which to fetch the schema (slug or ID). This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "schema:fetch", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "schema", "fetch.js" ] }, "schema:publish": { "aliases": [], "args": { "file": { "description": "Path to the schema file(s)", "hidden": false, "name": "file", "required": true } }, "description": "publishes schema", "flags": { "debug": { "name": "debug", "summary": "Whether debug output for HTTP calls and similar should be enabled.", "allowNo": false, "type": "boolean" }, "service": { "description": "service name (only for distributed schemas)", "name": "service", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "url": { "description": "service url (only for distributed schemas)", "name": "url", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "metadata": { "description": "additional metadata to attach to the GraphQL schema. This can be a string with a valid JSON, or a path to a file containing a valid JSON", "name": "metadata", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.endpoint": { "description": "registry endpoint", "name": "registry.endpoint", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry": { "deprecated": { "message": "use --registry.endpoint instead", "version": "0.21.0" }, "description": "registry address", "name": "registry", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "registry.accessToken": { "description": "registry access token", "name": "registry.accessToken", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "token": { "deprecated": { "message": "use --registry.accessToken instead", "version": "0.21.0" }, "description": "api token", "name": "token", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "author": { "description": "author of the change", "name": "author", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "commit": { "description": "associated commit sha", "name": "commit", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "github": { "description": "Connect with GitHub Application", "name": "github", "allowNo": false, "type": "boolean" }, "force": { "deprecated": { "message": "--force is enabled by default for newly created projects" }, "description": "force publish even on breaking changes", "name": "force", "allowNo": false, "type": "boolean" }, "experimental_acceptBreakingChanges": { "deprecated": { "message": "--experimental_acceptBreakingChanges is enabled by default for newly created projects" }, "description": "(experimental) accept breaking changes and mark schema as valid (only if composable)", "name": "experimental_acceptBreakingChanges", "allowNo": false, "type": "boolean" }, "require": { "description": "Loads specific require.extensions before running the codegen and reading the configuration", "name": "require", "default": [], "hasDynamicHelp": false, "multiple": true, "type": "option" }, "target": { "description": "The target to which to publish to (slug or ID). This can either be a slug following the format \"$organizationSlug/$projectSlug/$targetSlug\" (e.g \"the-guild/graphql-hive/staging\") or an UUID (e.g. \"a0f4c605-6541-4350-8cfe-b31f21a4bf80\").", "name": "target", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "schema:publish", "pluginAlias": "@graphql-hive/cli", "pluginName": "@graphql-hive/cli", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "schema", "publish.js" ] } }, "version": "0.49.1-alpha-20250319204917-b693c4f5284ce91daeebe4d10a5b7fa260d712bb" }