File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1414from ..ctl .exceptions import QueryNotFoundError
1515from ..ctl .utils import catch_exception , find_graphql_query , parse_cli_vars
1616from ..exceptions import GraphQLError
17- from ..utils import get_branch , write_to_file
17+ from ..utils import write_to_file
1818from ..yaml import SchemaFile
1919from .parameters import CONFIG_PARAM
2020from .utils import load_yamlfile_from_disk_and_exit
@@ -68,8 +68,6 @@ def validate_graphql(
6868) -> None :
6969 """Validate the format of a GraphQL Query stored locally by executing it on a remote GraphQL endpoint"""
7070
71- branch = get_branch (branch )
72-
7371 try :
7472 query_str = find_graphql_query (query )
7573 except QueryNotFoundError :
@@ -81,6 +79,10 @@ def validate_graphql(
8179 variables_dict = parse_cli_vars (variables )
8280
8381 client = initialize_client_sync ()
82+
83+ if not branch :
84+ branch = client .config .default_infrahub_branch
85+
8486 try :
8587 response = client .execute_graphql (
8688 query = query_str ,
You can’t perform that action at this time.
0 commit comments