mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
7 lines
224 B
JavaScript
7 lines
224 B
JavaScript
export function getFields (info) {
|
|
const selections = info.fieldASTs[0].selectionSet.selections
|
|
return selections.reduce((fields, selection) => {
|
|
fields[selection.name.value] = selection
|
|
return fields
|
|
}, {})
|
|
}
|