queryFieldListToString function
Implementation
String queryFieldListToString(
GraphQLObjectType objectType,
GraphQLRootObjectType rootObjectType,
) {
final queryInputVariableList = collectVariableInQueryFieldList(objectType);
return (rootObjectType == GraphQLRootObjectType.mutation
? 'mutation'
: 'query') +
(queryInputVariableList.isEmpty
? ''
: ' (' +
queryInputVariableList
.map(
(variable) =>
r'$' + variable.name + ': ' + variable.type.toString(),
)
.safeJoin(', ') +
')') +
_queryFieldListToStringLoop(objectType, 0) +
'\n';
}