Closed joeprabawa closed 1 month ago
Interesting, seems to be some either database-side, or driver-side issue, can't reproduce it locally with 0.30.10
version of drizzle-orm
and drizzle-graphql v0.5.0
, and although versions of drizzle-graphql
mismatch, in 0.5.0 I didn't do anything to fix such a bug had there been one to begin with. Try using pnpm add postgres
as your database driver, as well as latest as of now version of drizzle-graphql
, which is 0.5.0
.
Your payload seems odd to me as well, since with GraphQL syntax it should be like
{
values: {
name: "Travel To Bali",
description: "Explore Bali for 5 Days",
isPublic: true,
numberOfDays: 5,
slug: "explore-bali-5-days"
}
}
instead of what you've posted, but since that didn't throw a syntax error, I assume that the one you've used in a query was correct. If not - please, try fixing your query and see whether that helps.
Your payload seems odd to me as well, since with GraphQL syntax it should be like
{ values: { name: "Travel To Bali", description: "Explore Bali for 5 Days", isPublic: true, numberOfDays: 5, slug: "explore-bali-5-days" } }
instead of what you've posted, but since that didn't throw a syntax error, I assume that the one you've used in a query was correct. If not - please, try fixing your query and see whether that helps.
Yes, at the moment i'm using apollo server, and it seems the editor not complaining. Answering from your previous answer above, i've already tried to update the drizzle-grapql
to latest, and run thepnpm add postgres
but the issue still occuring.
Just now I've tried to remove the created_at
& updated_at
field, and run db migration again
and the mutation works
at the moment i'll close this issue, let me investigate my environment first. Anyway thankyou so much for the guides & helps 🙏
First of all, pardon if i'm doing wrong how to raise an issue. At the moment, i'm learning graphql and took interest using this library. Step to reproduce:
I'm using these dependencies such as below :
And I have db schema like below:
and i've checked the schema already reflect on the db:
but when i try create a mutation for
insertIntoTravelsSingle
with payload like below:it throws an error with message:
Need help is it me doing something wrong or maybe there's an actual issue happening. Thankyou in advance! 🙏