Raj
Raj
PPrisma
Created by samuelcole on 9/30/2024 in #help-and-questions
TypeError: client._engine.apiKey is not a function
Yeah, Next.js was bundling the types & client together even when only the types were being used. I split my imports from @acme/db to @acme/db/client & @acme/db/types and now that runtime error has stopped. The only thing is that I get this TS inference error for the exported client singleton https://i.raj.wtf/imgs/LiwJoixTFq4KxF3Tpl7AkLcJzMu.png
20 replies
PPrisma
Created by samuelcole on 9/30/2024 in #help-and-questions
TypeError: client._engine.apiKey is not a function
@Nurul (Prisma) I'm still getting issues w/ being unable to find the env var: https://i.raj.wtf/imgs/t70I24mparbnlbXy02EuMDzeyU6.png though, saying that, I might need to revisit the way that my @db internal package is bundled/distributed across my codebase. I'm assuming the issue is occurring due to the client making its way to the browser instead of staying purely on the server (though the only other thing that gets exported is the type defs)
20 replies
PPrisma
Created by samuelcole on 9/30/2024 in #help-and-questions
TypeError: client._engine.apiKey is not a function
❤️
20 replies
PPrisma
Created by Raj on 10/1/2024 in #help-and-questions
Accelerate On-Demand Invalidation Rate Limit
Awesome, thanks for the info 🙂
6 replies
PPrisma
Created by samuelcole on 9/30/2024 in #help-and-questions
TypeError: client._engine.apiKey is not a function
Yes
20 replies
PPrisma
Created by samuelcole on 9/30/2024 in #help-and-questions
TypeError: client._engine.apiKey is not a function
Also encountering issues with Accelerate 1.2.0, albeit different from what you've listed: 1. I keep getting runtime errors saying that my ACCELERATE_DB_URL env var isn't found (when it is and the queries are clearly running) 2. My exported client/singleton is running into type inference issues
20 replies
PPrisma
Created by Raj on 10/1/2024 in #help-and-questions
Accelerate On-Demand Invalidation Rate Limit
what’s the rate limit for invalidating the cache on-demand though? I would assume it’s not the same as the project-level cache invalidation rate limit via the dashboard
6 replies
PPrisma
Created by sylvester stallone on 3/28/2024 in #help-and-questions
is there still no option to manually invalidate the cache?
Been waiting on on-demand invalidation since Accelerate was first announced.
11 replies
PPrisma
Created by Raj on 7/18/2024 in #help-and-questions
Accelerate SWR option not re-fetching/revalidating cache
Sorry, I somehow missed this @Nurul (Prisma)! Using a Postgres DB (via Supabase)
8 replies
PPrisma
Created by Raj on 7/18/2024 in #help-and-questions
Accelerate SWR option not re-fetching/revalidating cache
await prisma.userProfile.findUniqueOrThrow({
where: {
userId: userID,
},
select: {
...PLATFORM_USER_FIELDS,
},
cacheStrategy: {
ttl: 30,
swr: 60,
}
});
await prisma.userProfile.findUniqueOrThrow({
where: {
userId: userID,
},
select: {
...PLATFORM_USER_FIELDS,
},
cacheStrategy: {
ttl: 30,
swr: 60,
}
});
Like JW887 on GitHub, it doesn't seem like the request to the database is being made/processed during the SWR period. Between the 30-90 second interval post-query (when the SWR period should be hit), all queries keep returning the stale data and the cache never gets updated. The only time the updated data is received is after the full 90 seconds when the cache misses and the DB is queried directly (which would trigger another 90 seconds of stale cached data)
8 replies
PPrisma
Created by Raj on 7/18/2024 in #help-and-questions
Accelerate SWR option not re-fetching/revalidating cache
cc @Nurul (Prisma) (apologies for the ping, but you were the one who responded to the above GH discussion)
8 replies
PPrisma
Created by Raj on 7/18/2024 in #help-and-questions
Accelerate SWR option not re-fetching/revalidating cache
https://github.com/prisma/prisma/discussions/23787#discussioncomment-9277949 This seems to outline exactly what I'm experiencing...
8 replies