Commit Graph

7 Commits

Author SHA1 Message Date
Simon Ser 864816cfbc client: rename Execute to Do
583d0b1bcb ("client/graphql: handle GraphQL errors") changed
Execute behavior by wrapping the result into a struct with "data"
and "errors" fields. This is a breaking change, but it's hard to
spot when upgrading core-go because it won't cause a compilation
error.

Rename Execute to Do to break the build and force callers to update
accordingly.
2024-01-24 11:50:42 +01:00
Simon Ser 583d0b1bcb client/graphql: handle GraphQL errors
Instead of leaving it up to the caller to check for GraphQL errors,
centralize in core-go.
2024-01-24 10:40:29 +01:00
Simon Ser f44afb103e go fmt 2021-08-26 13:56:41 +02:00
Simon Ser 12996e4a18 client: add config option to override API origin
If the config file contains an "api-origin" key for a service, prefer it
instead of "origin". This allows users to directly point the Python
frontend to the Go backend for local development, without having to
setup a reverse proxy.

This is the Go port of [1].

While at it, use GetOrigin for symmetry with the Python code.

[1]: 6c2ee03923
2020-12-04 10:27:24 -05:00
Drew DeVault 906acc055d client: populate NodeID from service name 2020-11-28 11:47:00 -05:00
Drew DeVault 943e283407 Drop leftover references to gql.sr.ht 2020-10-06 14:09:09 -04:00
Drew DeVault b0ebfa5f05 client: import from gql.sr.ht 2020-10-06 11:21:03 -04:00