If somebody is interested, I solved this problem with this quickfix.
// This function constructs the user query from the info parameter.
// TODO(till): This is a quick fix, wait for the Prisma client to support nested queries on its own.
export function infoToUserQuery(info, current: string = ‘’): string {
if (current === ‘’) {
info = info.fieldNodes[0].selectionSet.selections;
}
current += ‘{ ‘;
for (const selection of info) {
current += selection.name.value + ’ ‘;
if (selection.selectionSet) {
current = infoToUserQuery(selection.selectionSet.selections, current);
}
}
current += ‘}’;
return current;
}