File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -112,12 +112,14 @@ async def export_schema(
112112@app .command ()
113113@catch_exception (console = console )
114114async 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 } " )
You can’t perform that action at this time.
0 commit comments