From 26d519d0fbb710e5ef01a005150855b131ecc73b Mon Sep 17 00:00:00 2001 From: Andrei Aaron Date: Tue, 4 Jun 2024 10:13:02 +0000 Subject: [PATCH] fix(zli): _schema query in zli code should not use empty parens Fix also some tests See https://github.com/vektah/gqlparser/issues/292 and https://github.com/vektah/gqlparser/pull/293 Signed-off-by: Andrei Aaron --- pkg/cli/client/discover.go | 2 +- pkg/extensions/search/userprefs_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cli/client/discover.go b/pkg/cli/client/discover.go index 90240ad15..21be4925d 100644 --- a/pkg/cli/client/discover.go +++ b/pkg/cli/client/discover.go @@ -128,7 +128,7 @@ func CheckExtEndPointQuery(config SearchConfig, requiredQueries ...GQLQuery) err schemaQuery := ` { - __schema() { + __schema { queryType { fields { name diff --git a/pkg/extensions/search/userprefs_test.go b/pkg/extensions/search/userprefs_test.go index 12257707e..9d6fab304 100644 --- a/pkg/extensions/search/userprefs_test.go +++ b/pkg/extensions/search/userprefs_test.go @@ -497,7 +497,7 @@ func TestChangingRepoState(t *testing.T) { gqlStarredRepos := ` { - StarredRepos() { + StarredRepos { Results { Name StarCount @@ -510,7 +510,7 @@ func TestChangingRepoState(t *testing.T) { gqlBookmarkedRepos := ` { - BookmarkedRepos() { + BookmarkedRepos { Results { Name StarCount