Hello,
sorry, it’s me again ;-) But I couldn’t find an answer for this question:
How can I put an argument in a field like described in GraphQL
{
user(id: 4) {
id
name
profilePic(size: 100)
}
}
It does not work with an object like this:
Tuser = class
private
Fid: Integer;
Fname: string;
public
property id: Integer read Fid write Fid;
property name: string read Fname write Fname;
function profilePic(size: Integer): string; // for simplicity the result type is string - could be some TprofilePic-Object
end;
GraphQL seems to request a property and not a function. But how could I put parameters / arguments to an property. It seems not to work with indexed properties either.
Regards
Harald