Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove refresh option #2350

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/common/feedGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ export enum Ranking {
export interface FeedOptions {
ranking: Ranking;
supportedTypes?: string[];
refresh?: boolean;
feedId?: string;
}

Expand Down
11 changes: 0 additions & 11 deletions src/schema/feeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,6 @@ export const typeDefs = /* GraphQL */ `
"""
unreadOnly: Boolean = false

"""
Force refresh the feed
"""
refresh: Boolean = false

Comment on lines -381 to -385
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rebelchris just to double check that frontend does not send this in any way 🙏 (if you did not already)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only removing it in the next app release here:
dailydotdev/apps#3687

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And extension, does it request it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the feeds do request it, so we can wait for adoption first to be safe I guess :)

This comment was marked as spam.

"""
Version of the feed algorithm
"""
Expand Down Expand Up @@ -1063,7 +1058,6 @@ interface AnonymousFeedArgs extends FeedArgs {
interface ConfiguredFeedArgs extends FeedArgs {
unreadOnly: boolean;
version: number;
refresh?: boolean;
}

interface SourceFeedArgs extends FeedArgs {
Expand Down Expand Up @@ -1361,7 +1355,6 @@ const feedResolverCursor = feedResolver<
offset: 0,
cursor: page.cursor,
allowed_post_types: args.supportedTypes,
...(args?.refresh && { refresh: true }),
}),
warnOnPartialFirstPage: true,
// Feed service should take care of this
Expand Down Expand Up @@ -1435,10 +1428,6 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
},
feed: (source, args: ConfiguredFeedArgs, ctx: Context, info) => {
if (args.version >= 2 && args.ranking === Ranking.POPULARITY) {
if (args?.refresh) {
counters?.api?.forceRefresh?.add(1);
}

return feedResolverCursor(
source,
{
Expand Down
4 changes: 0 additions & 4 deletions src/telemetry/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ import { ValueType } from '@opentelemetry/api';

const counterMap = {
api: {
forceRefresh: {
name: 'force_refresh',
description: 'How many times a feed force refresh has been triggered',
},
requests: {
name: 'requests',
description: 'How many requests have been processed',
Expand Down
Loading