Skip to content

Commit 448eac4

Browse files
committed
Change default value to avoid issue with doc
1 parent 89779f4 commit 448eac4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/docs/infrahubctl/infrahubctl-graphql.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $ infrahubctl graphql generate-return-types [OPTIONS] [QUERY]
4747

4848
**Arguments**:
4949

50-
* `[QUERY]`: Location of the GraphQL query file(s). [default: /Users/damien/projects/infrahub-sdk-python-pink]
50+
* `[QUERY]`: Location of the GraphQL query file(s).
5151

5252
**Options**:
5353

infrahub_sdk/ctl/graphql.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,14 @@ async def export_schema(
112112
@app.command()
113113
@catch_exception(console=console)
114114
async def generate_return_types(
115-
query: Path = typer.Argument(Path.cwd(), help="Location of the GraphQL query file(s)."),
115+
query: Path | None = typer.Argument(None, help="Location of the GraphQL query file(s)."),
116116
schema: Path = typer.Option("schema.graphql", help="Path to the GraphQL schema file."),
117117
_: str = CONFIG_PARAM,
118118
) -> None:
119119
"""Create Pydantic Models for GraphQL query return types"""
120120

121+
query = Path.cwd() if query is None else query
122+
121123
# Load the GraphQL schema
122124
if not schema.exists():
123125
raise FileNotFoundError(f"GraphQL Schema file not found: {schema}")

0 commit comments

Comments
 (0)