add support for custom scalars -- mainly adding proper import machinery

This commit is contained in:
Ben Kraft
2021-04-08 13:07:31 -07:00
parent e68787ad35
commit b4e8316c6a
31 changed files with 283 additions and 89 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ package test
import (
"github.com/Khan/genqlient/graphql"
"github.com/me/mypkg"
)
type InputObjectQueryResponse struct {
@@ -11,7 +12,7 @@ type InputObjectQueryResponse struct {
}
type InputObjectQueryUser struct {
Id string `json:"id"`
Id mypkg.ID `json:"id"`
}
type Role string
@@ -24,7 +25,7 @@ const (
type UserQueryInput struct {
Email string `json:"email"`
Name string `json:"name"`
Id string `json:"id"`
Id mypkg.ID `json:"id"`
Role Role `json:"role"`
Names []string `json:"names"`
}