myMonetizationSettings method
- int? first,
- MonetizationSettingsCursor? after,
- int? last,
- MonetizationSettingsCursor? before,
Returns MonetizationSettings of the authenticated MyUser filtered by the provided criteria.
Searching by.userId is exact, returning:
- Individual MonetizationSettings (if the
by.userIdis different from the MyUser.id). - Common MonetizationSettings (if
by.userIdis the MyUser.id). - If no by (or
by.userId) argument is provided, then individual MonetizationSettings for all Users will be returned, also including the common ones.
Authentication
Mandatory.
Sorting
Returned MonetizationSettings are sorted depending on the provided arguments:
If the by.userId argument is specified, then exact
MonetizationSettings are returned.
Otherwise, the returned MonetizationSettings are sorted primarily by their MonetizationSettings.createdAt field, and secondary by IDs of the Users they are specified for, in descending order.
Implementation
Future<MyMonetizationSettings$Query$MyMonetizationSettings>
myMonetizationSettings({
int? first,
MonetizationSettingsCursor? after,
int? last,
MonetizationSettingsCursor? before,
}) async {
Log.debug(
'myMonetizationSettings($first, $after, $last, $before)',
'$runtimeType',
);
final variables = MyMonetizationSettingsArguments(
pagination: MonetizationSettingsPagination(
first: first,
after: after,
last: last,
before: before,
),
);
final QueryResult result = await client.query(
QueryOptions(
operationName: 'MyMonetizationSettings',
document: MyMonetizationSettingsQuery(variables: variables).document,
variables: variables.toJson(),
),
);
return MyMonetizationSettings$Query.fromJson(
result.data!,
).myMonetizationSettings;
}