Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: remove special template on query subcommand #7124

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

grouville
Copy link
Member

@grouville grouville commented Apr 18, 2024

One of the action items discussed in #7107 (comment)

dagger query is not the main entrypoint of the dagger CLI anymore. Even though the special template made some sense, it is a code duplication to maintain. With the upcoming changes (titles in bold, etc ...) and the remaining presence of the example on the command's help, it does make sense to remove it and keep a single source of truth

New output

./dagger query --help
Send API queries to a dagger engine.

When no document file is provided, reads query from standard input.

Can optionally provide the GraphQL operation name if there are multiple
queries in the document.

Usage:
  dagger query [flags] [OPERATION]

Aliases:
  query, q

Examples:
dagger query <<EOF
{
  container {
    from(address:"hello-world") {
      withExec(args:["/hello"]) {
        stdout
      }
    }
  }
}
EOF


Flags:
      --doc string        Read query from file (defaults to reading from stdin)
  -m, --mod string        Path to dagger.json config file for the module or a directory containing that file. Either local
                          path (e.g. "/path/to/some/dir") or a github repo (e.g. "github.com/dagger/dagger/path/to/some/subdir")
      --var strings       List of query variables, in key=value format
      --var-json string   Query variables in JSON format (overrides --var)

Global Flags:
  -d, --debug             show debug logs and full verbosity
      --progress string   progress output format (auto, plain, tty) (default "auto")
  -s, --silent            disable terminal UI and progress output
  -v, --verbose count     increase verbosity (use -vv or -vvv for more)

cc @marcosnils, as he was the original author of this

@grouville grouville changed the title chore: remove special template on query subcommand cli: remove special template on query subcommand Apr 18, 2024
`dagger query` is not the main entrypoint of the dagger CLI anymore. Even though the special template made some sense, it is a code duplication to maintain

Signed-off-by: grouville <guillaume@dagger.io>
Copy link
Contributor

@helderco helderco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@grouville grouville merged commit dfc58bb into dagger:main Apr 19, 2024
44 of 45 checks passed
vikram-dagger pushed a commit to vikram-dagger/dagger that referenced this pull request May 3, 2024
`dagger query` is not the main entrypoint of the dagger CLI anymore. Even though the special template made some sense, it is a code duplication to maintain

Signed-off-by: grouville <guillaume@dagger.io>
@helderco helderco mentioned this pull request May 6, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants