Help Needed: Error with Arguments in GraphQL Resolver Using Drizzle ORM, Serverless, and TypeScript
Hi Drizzle Community,
I'm running into an issue with GraphQL and Drizzle ORM while working on a serverless project using TypeScript. I've set up my environment with the following key components:
- Environment: Serverless Framework
- Language: TypeScript
- ORM: Drizzle ORM
- GraphQL: Apollo Server with
@apollo/server
- Database: PostgreSQL (using drizzle-orm/postgres-js
)
Problem Description
I'm encountering the following error when trying to run my serverless application:
Context
Here’s a simplified version of my code setup:
user.schema.ts
:
2 Replies
schema.ts
:
What I’ve Tried
- Logging args
: I added console.log(args)
inside the resolver, but it doesn’t seem to be logging anything before the error occurs.
- Hardcoding authUserId
: Even when I hardcode authUserId
, I still receive the same error about arguments.
tsconfig.json
Here is my tsconfig.json
for context:
Request
Has anyone encountered this issue before or knows what might be causing it? Any help would be greatly appreciated!
Thank you!
Guys if need i will share code repo, i need help plz 🙏
Hey guys, has anyone tried drizzle-graphql with custom queries?
I need help or suggestions.Please check this to reproduce the issue: https://github.com/jacksonkasi1/drizzle-graphql-lambda
GitHub
GitHub - jacksonkasi1/drizzle-graphql-lambda
Contribute to jacksonkasi1/drizzle-graphql-lambda development by creating an account on GitHub.