myMonetizationSettings method

Future<MyMonetizationSettings$Query$MyMonetizationSettings> myMonetizationSettings({
  1. int? first,
  2. MonetizationSettingsCursor? after,
  3. int? last,
  4. MonetizationSettingsCursor? before,
})

Returns MonetizationSettings of the authenticated MyUser filtered by the provided criteria.

Searching by.userId is exact, returning:

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;
}