add support for custom scalars -- mainly adding proper import machinery
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
package test
|
||||
|
||||
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
)
|
||||
|
||||
type convertTimezoneResponse struct {
|
||||
Convert time.Time `json:"convert"`
|
||||
}
|
||||
|
||||
func convertTimezone(
|
||||
client graphql.Client,
|
||||
dt time.Time,
|
||||
tz string,
|
||||
) (*convertTimezoneResponse, error) {
|
||||
variables := map[string]interface{}{
|
||||
"dt": dt,
|
||||
"tz": tz,
|
||||
}
|
||||
|
||||
var retval convertTimezoneResponse
|
||||
err := client.MakeRequest(
|
||||
nil,
|
||||
"convertTimezone",
|
||||
`
|
||||
query convertTimezone ($dt: DateTime!, $tz: String) {
|
||||
convert(dt: $dt, tz: $tz)
|
||||
}
|
||||
`,
|
||||
&retval,
|
||||
variables,
|
||||
)
|
||||
return &retval, err
|
||||
}
|
||||
Reference in New Issue
Block a user