Skip to content

Commit 9bca8a8

Browse files
authored
[DefaultDataForPath] Fix GraphQL query for galleries (#610)
1 parent 377ba6d commit 9bca8a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plugins/defaultDataForPath/defaultDataForPath.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,11 @@ query findImage($id: ID) {\
208208
function getGalleryPath(ID) {
209209
var query =
210210
"\
211-
query findGallery($id: ID) {\
211+
query findGallery($id: ID!) {\
212212
findGallery(id: $id) {\
213-
path\
213+
folder {\
214+
path\
215+
}\
214216
}\
215217
}";
216218

@@ -224,7 +226,7 @@ query findGallery($id: ID) {\
224226
return null;
225227
}
226228

227-
var path = findGallery.path;
229+
var path = findGallery.folder.path;
228230
return path;
229231
}
230232

0 commit comments

Comments
 (0)