Skip to content

Conversation

@igorovh
Copy link
Member

@igorovh igorovh commented Jul 23, 2025

Description by Callstackai

This PR introduces a fix to the chatters request by adding a fetch policy parameter to the GraphQL query method in the Twitch API, allowing for more control over caching behavior.

Diagrams of code changes
sequenceDiagram
    participant ChattersModule
    participant TwitchApi
    participant ApolloClient

    ChattersModule->>TwitchApi: gql<ChattersResponse>(ChattersQuery, {name: login}, "network-only")
    TwitchApi->>TwitchApi: getApolloClient()
    TwitchApi->>ApolloClient: query(gql query, variables, fetchPolicy)
    ApolloClient-->>TwitchApi: GQLResponse<T>
    TwitchApi-->>ChattersModule: {data}
    ChattersModule->>ChattersModule: Update chatter counter
    ChattersModule->>ChattersModule: Log info message
Loading
Files Changed
FileSummary
src/platforms/twitch/apis/twitch.api.tsAdded fetchPolicy parameter to gql method for controlling caching behavior.
src/platforms/twitch/modules/chatters/chatters.module.tsxUpdated gql method calls to include fetchPolicy for chatters requests.
src/types/platforms/twitch/twitch.utils.types.tsDefined ApolloClientFetchPolicy type to specify possible fetch policies.

@igorovh igorovh merged commit af711d7 into master Jul 23, 2025
2 checks passed
@igorovh igorovh deleted the fix/chatters-bypass-cache branch July 23, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants