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