Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
172 views

I am building golang graphql endpoint with graphql-go https://github.com/graphql-go/graphql Here is chunk of my resolver.go func GetRootMutation(db *gorm.DB, req *http.Request) *graphql.Object { ...
Herza Islad's user avatar
2 votes
0 answers
29 views

Graphql endpoint gets an array of ints, resource_ids. This is the whole resolve function: "resourceFilterByIds": &graphql.Field{ Type: graphql.NewList(resourceType), ...
Brotkrumen's user avatar
2 votes
0 answers
325 views

I am new to Go and GraphQL and was wondering if it is possible to programmatically build the schema from a JSON schema fetched from an endpoint. I am currently looking to use gqlgen which allows for ...
user11872092's user avatar
2 votes
0 answers
253 views

I've been using github.com/graphql-go/graphql library for my GraphQL project. Currently, I'm trying to add authorization middleware to the following query. Using github.com/99designs/gqlgen library we ...
Masudur Rahman's user avatar
1 vote
0 answers
62 views

Here is my resolver: // CreateBook is the resolver for the createBook field. func (r *mutationResolver) CreateBook(ctx context.Context, input model.NewBook) (*model.Book, error) { book := &model....
Bedrock's user avatar
  • 11
0 votes
1 answer
1k views

I am currently building chat application with microservice architecture, where auth(login and signup) service and chat service are separated using Graphql. I was trying to attach a JWT to the request ...
Taki's user avatar
  • 45
1 vote
1 answer
684 views

I have a nested GraphQL query with the following structure query{ parentMetrics(cityNames: ["Cali"], orderingDateFrom: "2021-01-01"){ sales ...
Abdullah Jaffer's user avatar
1 vote
1 answer
83 views

type Book struct { ID string `json:"id"` } bookType := graphql.NewObject(graphql.ObjectConfig{ Name: "Books", Description: "Books List", ...
Nicole Staline's user avatar
2 votes
0 answers
204 views

I used router in my code as: router := chi.NewRouter() router.Use(auth.Middleware()) srv := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: &graph.Resolver{}})) ...
Sarisha Prajapati's user avatar
3 votes
1 answer
2k views

I am using a gqlgen package for Golang and I am trying to implement a Dataloaders. This is the Dataloader I am using: https://github.com/graph-gophers/dataloader I did everything as in the Tutorial, ...
Amel Amcë Muminovic's user avatar
1 vote
1 answer
395 views

Looking at the set up for go-vcr // Start our recorder r, err := recorder.New("fixtures/etcd") if err != nil { log.Fatal(err) } defer r.Stop() // Make sure recorder ...
mcbain83's user avatar
  • 512
1 vote
1 answer
946 views

GraphQL query field post and list return all data except created_at. It always null. I check GetPostBySlug and GetPostList variables and it contain data from Postgres. Where is my mistake? model.go ...
oyaro-tech's user avatar
0 votes
2 answers
551 views

I'm having trouble understanding arrays in Go, especially with both graphql and mongo. With JS this all would've been a breeze for me, but I'm wondering if you can look at what I have and point out ...
user avatar
0 votes
1 answer
308 views

I am building an API using GraphQL and one of the options of the API is to place an order I am using Go 1.16 with graphql-go as the GraphQL backend The JSON format for the PlaceOrder API call is: { ...
clcordell's user avatar
0 votes
1 answer
566 views

I have been experimenting with go-grapqhql and I have been able to successfully create some schemas such as this: type Artist struct { ID string `json:"id,omitempty"` Name string `...
tsm's user avatar
  • 519
0 votes
1 answer
483 views

I'm new to both Hasura/Graphql and GO. I've succeeded in writing a couple of Hasura actions which are supported by a GO server which in turn calls the Hasura server to run a query. These both work. ...
SusanAdey's user avatar
3 votes
1 answer
2k views

I am trying to write Graphql Mutation inside Go. I am using github.com/graphql-go/graphql library. Here is the code i have written for the same. package main import ( "bytes" "...
rachana's user avatar
  • 3,442
1 vote
0 answers
155 views

i'm trying to make a filed that's either going to be a string or a date or an int var PredSearchElementType = graphql.NewObject(graphql.ObjectConfig{ Name: "PredSearchElementType", ...
Soufian Chaoui's user avatar
-2 votes
1 answer
473 views

I am using Go 1.13 Postgres 11 and GraphQL I am trying to run three different queries: 1. To get details of few employees when some condition is true. 2. To get all details of all employees. 3. To ...
Prem Prakash's user avatar
2 votes
0 answers
789 views

I'm building a cli application using GitHub API V4. I need to remove all labels a repository has. URL: https://api.github.com/graphql HEADERS: Accept: application/vnd.github.bane-preview+json ...
erdaltsksn's user avatar
0 votes
1 answer
615 views

PROBLEM the mutation below mutation { signUp(signUpInput: {email: "[email protected]", username: "newUser", password: "asdfasdfawerawer"}) { email username } } errors out the following {...
user3366943's user avatar
0 votes
1 answer
665 views

I am using the graphql-go library along with graphql-go/relay. I am trying to write some basic tests for my API, and am having some trouble with the base64 encoding mechanism. When I execute a simple ...
jordancooperman's user avatar
2 votes
1 answer
610 views

I'm creating a graphql api in golang using "github.com/gin-gonic/gin" "github.com/graphql-go/graphql" To secure my api i will use a jwt token and i want to keep my api to be fully graphql (the only ...
Soufian Chaoui's user avatar
1 vote
2 answers
2k views

I am learning golang with gqlgen and gorm as orm, I am creating an app using with 2 models user and messages where the user has a list of messages, and the messages have sender and recipient. I have ...
Snowflake's user avatar
  • 311
2 votes
1 answer
2k views

I need to make a request to an external API which uses GraphQL using Go. To do so, I'm using the following client: https://github.com/graphql-go/graphql but the documentation is very limited and don't ...
MrCujo's user avatar
  • 1,393
2 votes
1 answer
67 views

The object itself inside the object is parsed with an empty field. input: { Products(search: {limit: 1, filters: {product_id: {gte: 5}}}) { data { product_id product_name ...
Евгений Лилеков's user avatar
0 votes
1 answer
230 views

As it turns out, graphql-go's help doc is not beginner friendly. I'm simply wondering what .NewList() does in, say, the following code: Type: graphql.NewList(types.Workouts)
seemcat's user avatar
  • 644
1 vote
1 answer
937 views

Using graphql-go how do we handle nested objects as in given api returns the following in resolver { id:"34", name:"something", region:{ id:34, name: "San jose" } } how do we implement ...
Ivanz's user avatar
  • 11
0 votes
1 answer
705 views

I'm using the Go implemenatation of GraphQL. How would you configure a mutation so that it can receive arguments with more than 1 level? For exemple, here is the list of arguments I would like to ...
SebScoFr's user avatar
  • 901
1 vote
1 answer
917 views

I am currently trying to work on a small Go project, and I have a problem I am trying to solve. I'm currently using github.com/jinzhu/gorm to handle database operations for the backend of a GraphQL ...
MisutoWolf's user avatar
  • 1,273
0 votes
1 answer
801 views

Im trying to made a simple GO Server that run with GraphQL and connects with PostgreSQL, the compilation and execution of the files goes well, and the connection to the database also goes well, but ...
Luis Cardoza Bird's user avatar
0 votes
0 answers
434 views

As the title, does GraphQL-go support upload files? Or I must create an endpoint besides my GraphQL-endpoint to POST files?
khue bui's user avatar
  • 1,446
0 votes
1 answer
883 views

I have this GraphQL type: type User { id: String name: String } defined by var UserObject = graphql.NewObject(graphql.ObjectConfig{ Name: "User", Fields: graphql.Fields{ "id":...
Héctor Valls's user avatar