<DxD/>
<DxD/>
Explore posts from servers
TtRPC
Created by Neon on 2/9/2024 in #❓-help
Mock form data middleware (
Find a way to do it ? @Neon
7 replies
TtRPC
Created by Neon on 2/9/2024 in #❓-help
Mock form data middleware (
@Neon
7 replies
TtRPC
Created by Neon on 2/9/2024 in #❓-help
Mock form data middleware (
so u want to test your trpc with unit testing ?
7 replies
TtRPC
Created by Atanga1920 on 11/27/2023 in #❓-help
sidebar search
What ?
3 replies
TtRPC
Created by <DxD/> on 11/24/2023 in #❓-help
Why my Authorization does not update ?
@Nick Lucas any chance of help?
4 replies
TtRPC
Created by Szymon on 11/18/2023 in #❓-help
tRPC with app router
Or ?
8 replies
TtRPC
Created by Szymon on 11/18/2023 in #❓-help
tRPC with app router
You want in trpc to create routes ?
8 replies
TtRPC
Created by Stanley on 10/26/2023 in #❓-help
Unsafe return of an `any` typed
Or check what you have in eslint as settings
5 replies
TtRPC
Created by Stanley on 10/26/2023 in #❓-help
Unsafe return of an `any` typed
Did you restart eslint ?
5 replies
TtRPC
Created by taylor.presto on 11/18/2023 in #❓-help
I am getting a errors after starting a TRPC project with T3. "Unsafe return of an `any` typed value"
I had this problem before
13 replies
TtRPC
Created by taylor.presto on 11/18/2023 in #❓-help
I am getting a errors after starting a TRPC project with T3. "Unsafe return of an `any` typed value"
:)))
13 replies
TtRPC
Created by taylor.presto on 11/18/2023 in #❓-help
I am getting a errors after starting a TRPC project with T3. "Unsafe return of an `any` typed value"
Or what is says ?
13 replies
TtRPC
Created by taylor.presto on 11/18/2023 in #❓-help
I am getting a errors after starting a TRPC project with T3. "Unsafe return of an `any` typed value"
What error do you have ?
13 replies
TtRPC
Created by <DxD/> on 11/13/2023 in #❓-help
Can set cookie with trpc?
3 days for a fu….ing CORS
43 replies
TtRPC
Created by <DxD/> on 11/13/2023 in #❓-help
Can set cookie with trpc?
:)))
43 replies
TtRPC
Created by <DxD/> on 11/17/2023 in #❓-help
How to use token in headers() ?
how here
import superjson from 'superjson';

import { AppRouter } from '../api-types';
import { httpBatchLink } from '@trpc/client';
import { createTRPCReact } from '@trpc/react-query';

export const trpcApi = createTRPCReact<AppRouter>();

let token: string = '';
export const setToken = (newToken: string) => {
console.log('se randeaza asta 3');
token = newToken;
};

export const trpcApiClientProvider = trpcApi.createClient({
links: [
httpBatchLink({
url: process.env.NEXT_PUBLIC_TRPC_API,
fetch(url, options) {
return fetch(url, {
...options,
credentials: 'include',
});
},
headers() {
console.log('Headers called 2. Token:', token);
return {
Authorization: token,
};
},
}),
],

transformer: superjson,
});
console.log('se randeaza asta 1');
import superjson from 'superjson';

import { AppRouter } from '../api-types';
import { httpBatchLink } from '@trpc/client';
import { createTRPCReact } from '@trpc/react-query';

export const trpcApi = createTRPCReact<AppRouter>();

let token: string = '';
export const setToken = (newToken: string) => {
console.log('se randeaza asta 3');
token = newToken;
};

export const trpcApiClientProvider = trpcApi.createClient({
links: [
httpBatchLink({
url: process.env.NEXT_PUBLIC_TRPC_API,
fetch(url, options) {
return fetch(url, {
...options,
credentials: 'include',
});
},
headers() {
console.log('Headers called 2. Token:', token);
return {
Authorization: token,
};
},
}),
],

transformer: superjson,
});
console.log('se randeaza asta 1');
i can send token ?
3 replies
TtRPC
Created by <DxD/> on 11/13/2023 in #❓-help
Can set cookie with trpc?
i add that and now works fine
43 replies
TtRPC
Created by <DxD/> on 11/13/2023 in #❓-help
Can set cookie with trpc?
🙂
43 replies
TtRPC
Created by <DxD/> on 11/13/2023 in #❓-help
Can set cookie with trpc?
i forgot to add
app.use(
cors({
origin: 'http://localhost:3000',
credentials: true,
}),
);
app.use(
cors({
origin: 'http://localhost:3000',
credentials: true,
}),
);
when i create express be
43 replies
TtRPC
Created by <DxD/> on 11/13/2023 in #❓-help
Can set cookie with trpc?
nvm, i solve it
43 replies