prisma / prisma1

💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
https://v1.prisma.io/docs/
Apache License 2.0
16.54k stars 862 forks source link

Golang, how to set up http method with GET? #4285

Closed Frank1e0927 closed 5 years ago

Frank1e0927 commented 5 years ago

I followed the official document,and make up the go-prisma,but I find that all requests are get methods。

where can i set up the http request method???

is the gqlgen or? somewhere?

matthewmueller commented 5 years ago

Hi @Frank1e0927,

Thanks for reaching out, can you give an example of your Go code?

Currently the individual HTTP requests are not configurable, but the HTTP client is configurable:

client := http.Client{}
prisma.New("my endpoint", "my secret", graphql.WithHTTPClient(&client))

I'm not sure if that would help your use case.

I'm a little surprised you're seeing GET requests, because the logic should end up here: https://github.com/machinebox/graphql/blob/3a92531802258604bd12793465c2e28bc4b2fc85/graphql.go#L116 with a POST request.