Skip to content

Fix positional argument handling and clarify path resolution in Zeus CLI#423

Open
PlayingWithClouds wants to merge 2 commits into
graphql-editor:masterfrom
PlayingWithClouds:master
Open

Fix positional argument handling and clarify path resolution in Zeus CLI#423
PlayingWithClouds wants to merge 2 commits into
graphql-editor:masterfrom
PlayingWithClouds:master

Conversation

@PlayingWithClouds
Copy link
Copy Markdown

I don’t know if I’m on the wrong track here or if this is intended behavior, but while trying to use the Zeus CLI I found the current argument and path resolution massively confusing.

Context

I started using graphql-zeus recently and noticed that invoking the CLI using positional arguments (as implied by usage and examples) did not work as expected. While investigating, I found that path resolution involved multiple overlapping mechanisms, some of which were undocumented.

Changes & Rationale

1. Fix positional argument handling (<path> [output_path])

The CLI is structured around positional arguments:

graphql-zeus <path> [output_path]

However, positional arguments were not being correctly consumed by yargs, which resulted in args._ being empty at runtime. This meant that:

  • <path> and [output_path] did not work when passed positionally
  • The CLI appeared broken when used as intended

2. Reduce ambiguity between positional args and config file

Before this change, the schema path could also be sourced from a config file, even though:

  • The config file is not mentioned in the documentation
  • The path was already expected positionally
  • Precedence between config vs CLI input was unclear

This made the CLI behavior difficult to reason about.

This PR ensures that:

  • Explicit CLI input (<path>, [output_path]) is the primary source of truth
  • Removes the config file entirely at least for urlOrPath

3. Respect the provided output path

Previously, the CLI always appended zeus to the output directory. As a result, even when [output_path] was explicitly provided, output was written to:

[output_path]/zeus

This PR updates the behavior so the provided output path is respected as-is, without implicit directory modification.

Notes

I’m not sure whether the previous behavior was intentional or relied on older usage patterns, but these changes reflect how the CLI appears to be intended to work based on its interface and usage.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 3, 2026

@PlayingWithClouds is attempting to deploy a commit to the aexol-studio Team on Vercel.

A member of the Team first needs to authorize it.

@alioguzhan
Copy link
Copy Markdown

Hi, any update on this? this is a blocker for upgrading the package.

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.

2 participants