Hi there,
Still cannot find a way to marshall / unmarshall easily graphql requests in Golang.
I found this one that lets you create a request from scratch, but doesn t let you marshall the text request to idiomatic GO : graphb/three_ways_to_construct_query_test.go at 912b8fd361d78e00687f934aace09cf8eb054449 · udacity/graphb · GitHub
I found a way to mutate with JSON, so I can easily manipulate JSON in GO (when I receive the request from my API in Go) : https://docs.dgraph.io/mutations/#using-json-operations-via-curl
BUT there is no clue how to manipulate a request (marshall / unmarshall)??
Any help ?
Something that would look like (this doesn t work) :
curl -H "Content-Type: application/json" -X POST localhost:8080/**QUERY**?commitNow=true -d $'
{
me(func:allofterms(name, "Star Wars")) @filter(ge(release_date, "1980")) {
name
release_date
revenue
running_time
director {
name
}
starring {
name
}
}
}'