使用Golang从Lambda调用AppSync突变

I'm trying to invoke a mutation from lambda (specifically using golang). I used AWS_IAM as the authentication method of my AppSync API. I also give appsync:GraphQL permission to my lambda.

However, after looking at the docs here: https://docs.aws.amazon.com/sdk-for-go/api/service/appsync/

I can't find any documentation on how to invoke the appsync from the library. Can anyone point me to the right direction here?

P.S. I don't want to query or subscribe or anything else from lambda. It's just a mutation

Thanks!

------UPDATE-------

Thanks to @thomasmichaelwallace for informing me to use https://godoc.org/github.com/machinebox/graphql

Now the problem is how can I sign the request from that package using aws v4?

I found a way of using plain http.Request and AWS v4 signing. (Thanks to @thomasmichaelwallace for pointing this method out)

client := new(http.Client)
// construct the query
query := AppSyncPublish{
    Query: `
        mutation ($userid: ID!) {
            publishMessage(
                userid: $userid
            ){
                userid
            }
        }
    `,
    Variables: PublishInput{
        UserID:     "wow",
    },
}
b, err := json.Marshal(&query)
if err != nil {
    fmt.Println(err)
}

// construct the request object
req, err := http.NewRequest("POST", os.Getenv("APPSYNC_URL"), bytes.NewReader(b))
if err != nil {
    fmt.Println(err)
}
req.Header.Set("Content-Type", "application/json")

// get aws credential
config := aws.Config{
    Region: aws.String(os.Getenv("AWS_REGION")),
}
sess := session.Must(session.NewSession(&config))


//sign the request
signer := v4.NewSigner(sess.Config.Credentials)
signer.Sign(req, bytes.NewReader(b), "appsync", "ap-southeast-1", time.Now())

//FIRE!!
response, _ := client.Do(req)

//print the response
buf := new(bytes.Buffer)
buf.ReadFrom(response.Body)
newStr := buf.String()

fmt.Printf(newStr)

The problem is that that API/library is designed to help you create/update app-sync instances.

If you want to actually invoke them then you need to POST to the GraphQL endpoint.

The easiest way for testing is to sign-in to the AWS AppSync Console, press the 'Queries' button in the sidebar and then enter and run your mutation.

I'm not great with go, but from what I can see there are client libraries for GraphQL in golang (e.g. https://godoc.org/github.com/machinebox/graphql).

If you are using IAM then you'll need to sign your request with a v4 signature (see this article for details: https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html)