Skip to main content
Version: v3.x

DDN CLI: ddn model add

Add new Models to the local metadata.

Synopsis

Add new Models to the local metadata

ddn model add <connector-link-name> <collection-name> [flags]

Examples

# Add all Models for DataConnectorLink "mydb" in the subgraph set in the context
ddn model add mydb "*"

# Add a new Model "Album" from the collection "Album" in the DataConnectorLink "mydb" in Subgraph "app"
ddn model add mydb Album --subgraph ./app/subgraph.yaml

# Add all the Models from the collections in the DataConnectorLink "mydb" in Subgraph "app"
ddn model add mydb "*" --subgraph ./app/subgraph.yaml

# Add Models filtered by glob pattern from the collections in the DataConnectorLink "mydb" in Subgraph "app"
ddn model add mydb "user*" --subgraph ./app/subgraph.yaml

Options

    --ci                Disables the use of context
-c, --context string Name of the context to use. (default <current_context>)
-h, --help help for add
--pattern string Pattern to detect targets. Can be 'glob' or 'literal'. (default "glob")
--subgraph string Path to Subgraph config file

Options inherited from parent operations

--log-level string   Log level. Can be DEBUG, WARN, INFO, ERROR, or FATAL. (default "INFO")
--no-prompt Do not prompt for required but missing flags
--out string Output format. Can be table, json or yaml. (default "table")
--timeout int Request timeout in seconds [env: HASURA_DDN_TIMEOUT] (default 100)

Parent operation

  • ddn model - Perform Model related operations