Skip to content

Commit

Permalink
tmp: disable content-language for gql
Browse files Browse the repository at this point in the history
tmp: dirty hack to not send content-language in feed
  • Loading branch information
omBratteng committed Jan 23, 2025
1 parent 6c220f3 commit c2e8555
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/shared/src/graphql/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,10 @@ export const gqlClient = new GraphQLClient(graphqlUrl, {
fetch: globalThis.fetch,
});

export const gqlClient2 = new GraphQLClient(graphqlUrl, {
credentials: 'include',
fetch: globalThis.fetch,
});

export const gqlRequest: typeof gqlClient.request = (...args) =>
gqlClient.request(...args);
4 changes: 2 additions & 2 deletions packages/shared/src/hooks/useFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '../lib/query';
import type { MarketingCta } from '../components/marketingCta/common';
import { FeedItemType } from '../components/cards/common/common';
import { GARMR_ERROR, gqlClient } from '../graphql/common';
import { GARMR_ERROR, gqlClient2 } from '../graphql/common';
import { usePlusSubscription } from './usePlusSubscription';
import { fetchAd } from '../lib/ads';
import { LogEvent } from '../lib/log';
Expand Down Expand Up @@ -110,7 +110,7 @@ export default function useFeed<T>(
const feedQuery = useInfiniteQuery<FeedData>({
queryKey: feedQueryKey,
queryFn: async ({ pageParam }) => {
const res = await gqlClient.request(query, {
const res = await gqlClient2.request(query, {
...variables,
first: pageSize,
after: pageParam,
Expand Down

0 comments on commit c2e8555

Please sign in to comment.