Tag: go-gorm
-
Gorm postgress DB database display error: bigint type for the user id
0 Based on the schema below, when I try to implement the function, it displays an error as it’s not a bigint type for the user id, but the user id in the user struct generated by gqlgen is a string. My schema: type Query { getUser(id: ID!): Users! listUsers: [Users!]! } type Mutation {…
-
in my gorm postgress db, my database display error as it is not bigint type for the user id
0 my gqlgen go app with postgres based on the schema when i try to implement the function it display error as it is not bigint type for the user id, but the user id in the user struct generated by gqlgen are string //my schema type Query { getUser(id: ID!): Users! listUsers: [Users!]! }…
-
Golang,gorm, postgress: invalid input is inserted
0 when i perform request using https://localhost:8080/graphql end point I cant create user using mutation **the whole code:** package main import ( "fmt" "log" "net/http" "time" "github.com/graphql-go/graphql" "github.com/graphql-go/handler" "github.com/kaleabbyh/foodrecipie/config" _ "github.com/lib/pq" ) ** Note: the table users is succesfullly migrated using separate migration code having ‘User’ attributes** type User struct { ID int `gorm:"type:int;primary_key;identity(100,1)"` Name…
-
GqlGen incorrectly generates directives that have colon character in value field
0 I use https://github.com/99designs/gqlgen for generating golang code from graphql schema. I need to be able to add gorm tags to the resulting golang types. For that, I declare a directive for custom go tags (in schema.directives.gql): directive @goTag( key: String! value: String ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION Then I use it the following way…