Hey team I'm having a little trouble with debuggin...
# help
r
Hey team I'm having a little trouble with debugging my graphql lambda. I'm trying to implement typegraphql and getting some errors. The problem is, I can only see these errors on 'production'
npx sst deploy --stage prod
. I cannot see errors on the debugging stack
npx sst start
. When I start the debugging stack and query my graphql lambda all I can see from the browser is
{"message":"Internal Server Error"}
and all I see from the command line is
Copy code
8e29906c-8622-4ab7-98fd-5bbcb2c97764 REQUEST dummy-graphql-apollo-my-s-ApolloApiLambdaGET95C283-IaPKrXb9HmmO [src/lambda.handler] invoked by API GET /
and eventually I'll see this (looks like the call to the lambda just times out)
Copy code
e30f62ab-2b81-4c6d-8fea-80baf75a8846-1651498094641 Failed to send a response because the Lambda Function timed out. If this happens again, you can increase the function timeout or use the --increase-timeout option with "sst start". Read more about the option here: <https://docs.serverless-stack.com/packages/cli#options>
However if I deploy this to prod I see a real error, I can paste in thread. This is a small git repo that should replicate the issue https://github.com/unwrap-nlp/graphql-apollo Do you mind helping me figure out how to see errors in the debugging stack?
f
@Ryan Barnes thanks for putthign the repo together. Let me take a look
r
thanks for taking a look. I appreciate it!
Any luck?
f
Hey @Ryan Barnes sorry I was a bit tied up w/ the v1 launch. @thdxr do u have a min to give this a try?
r
no worries. I'm on the fence of actually using TypeGraphQl. Just wondering if there was something obviously wrong with my setup.
t
I think if you use 1.0 we fixed the issue of not seeing a real error in local dev
r
ooooooooo
t
btw if you're considering typegraphql checkout https://pothos-graphql.dev/ it's what we're going to use in our recommended graphql stack
r
I can give this a try in a bit. Will post probs later today.
ok, is there a chance that integrates with prisma?
t
he actually has a prisma plugin: https://pothos-graphql.dev/docs/plugins/prisma
but I generally don't recommend using prisma in serverless environments unless you use their data proxy
r
instead of the AWS RDS proxy?
t
yeah otherwise you'll need to ship large binaries along with your lambda which will make cold start not great
r
facemelt
t
worth trying out yourself though if you particularly like prisma
r
that's fair. I haven't actually used prisma, it just seems to offer some nice features on top of graphql for interacting with a db.
still in the exploration stage. Open to other suggestions.
t
We generally recommend
kysely
for prisma like functionality
r
I'll have to check it out
my other constraint is I need to run MySQL 8.0, so aurora serverless v1 and the dataAPI are out.
currently I'm planning on RDS Cluster in private subnet / natgateway with RDS Proxy that the lambda connects to.
does kysely have a similarly large binary to connect to the Proxy instead of the dataAPI
t
no it doesn't, it just uses a normal mysql nodejs driver underneath
which does include some native code but it's small