diff --git a/src/services/gquery.js b/src/services/gquery.js index 98e99997d..dbbb13c41 100644 --- a/src/services/gquery.js +++ b/src/services/gquery.js @@ -23,7 +23,11 @@ function getSelections (a) { const selections = {} for (const selection of a.selectionSet.selections) { if (selection.kind === 'Field') { - selections[selection.name.value] = selection + let key = selection.name.value + if (Object.hasOwnProperty.call(selection, 'alias') && selection.alias) { + key = selection.alias.value + } + selections[key] = selection } } return selections