DataFetchingEnvironment.fields has information of selected fields.
But when I run below query, I can't find a way to know the field selectionSet at emplPositionClasses field. Because it is explicit defined fragment, so the instance of selection in emplPositionClasses selectionSet is FragmentSpread. and there is no methods to get selectionSet on FragmentSpread.
For the other two type of selection, Field and InlineFragment, there are methods to get selectionSet, so inline fragment has no issue.
the field emplPositionClasses type is EmplPositionClassConnection
query {
mantle {
emplPositionClasses {
...EmplPositionClassesFragment
}
}
}
fragment EmplPositionClassesFragment on EmplPositionClassConnection {
edges {
node {
id
emplPositionClassId
title
description
}
}
}
So is it reasonable to also add getSelectionSet() method on class FragmentSpread?
DataFetchingEnvironment.fields has information of selected fields.
But when I run below query, I can't find a way to know the field selectionSet at emplPositionClasses field. Because it is explicit defined fragment, so the instance of selection in emplPositionClasses selectionSet is FragmentSpread. and there is no methods to get selectionSet on FragmentSpread.
For the other two type of selection, Field and InlineFragment, there are methods to get selectionSet, so inline fragment has no issue.
the field
emplPositionClassestype isEmplPositionClassConnectionSo is it reasonable to also add getSelectionSet() method on class FragmentSpread?