Make test ID type actually exist
This way I can start to test that the code compiles.
This commit is contained in:
@@ -98,7 +98,7 @@ func TestGenerate(t *testing.T) {
|
|||||||
Generated: goFilename,
|
Generated: goFilename,
|
||||||
ExportOperations: queriesFilename,
|
ExportOperations: queriesFilename,
|
||||||
Scalars: map[string]string{
|
Scalars: map[string]string{
|
||||||
"ID": "github.com/me/mypkg.ID",
|
"ID": "github.com/Khan/genqlient/internal/testutil.ID",
|
||||||
"DateTime": "time.Time",
|
"DateTime": "time.Time",
|
||||||
"Junk": "interface{}",
|
"Junk": "interface{}",
|
||||||
"ComplexJunk": "[]map[string]*[]*map[string]interface{}",
|
"ComplexJunk": "[]map[string]*[]*map[string]interface{}",
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InputEnumQueryResponse is returned by InputEnumQuery on success.
|
// InputEnumQueryResponse is returned by InputEnumQuery on success.
|
||||||
@@ -21,7 +21,7 @@ type InputEnumQueryUsersWithRoleUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role is a type a user may have.
|
// Role is a type a user may have.
|
||||||
|
|||||||
+5
-5
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InputObjectQueryResponse is returned by InputObjectQuery on success.
|
// InputObjectQueryResponse is returned by InputObjectQuery on success.
|
||||||
@@ -24,7 +24,7 @@ type InputObjectQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role is a type a user may have.
|
// Role is a type a user may have.
|
||||||
@@ -50,9 +50,9 @@ type UserQueryInput struct {
|
|||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// id looks the user up by ID. It's a great way to look up users.
|
// id looks the user up by ID. It's a great way to look up users.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Role Role `json:"role"`
|
Role Role `json:"role"`
|
||||||
Names []string `json:"names"`
|
Names []string `json:"names"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func InputObjectQuery(
|
func InputObjectQuery(
|
||||||
|
|||||||
+17
-17
@@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InterfaceNestingResponse is returned by InterfaceNesting on success.
|
// InterfaceNestingResponse is returned by InterfaceNesting on success.
|
||||||
@@ -17,7 +17,7 @@ type InterfaceNestingResponse struct {
|
|||||||
// InterfaceNestingRootTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopic struct {
|
type InterfaceNestingRootTopic struct {
|
||||||
// ID is documented in the Content interface.
|
// ID is documented in the Content interface.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Children []InterfaceNestingRootTopicChildrenContent `json:"-"`
|
Children []InterfaceNestingRootTopicChildrenContent `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ func (v *InterfaceNestingRootTopic) UnmarshalJSON(b []byte) error {
|
|||||||
// InterfaceNestingRootTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
// InterfaceNestingRootTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
||||||
type InterfaceNestingRootTopicChildrenArticle struct {
|
type InterfaceNestingRootTopicChildrenArticle struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Parent InterfaceNestingRootTopicChildrenArticleParentTopic `json:"parent"`
|
Parent InterfaceNestingRootTopicChildrenArticleParentTopic `json:"parent"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ func (v InterfaceNestingRootTopicChildrenArticle) implementsGraphQLInterfaceInte
|
|||||||
// InterfaceNestingRootTopicChildrenArticleParentTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopicChildrenArticleParentTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopicChildrenArticleParentTopic struct {
|
type InterfaceNestingRootTopicChildrenArticleParentTopic struct {
|
||||||
// ID is documented in the Content interface.
|
// ID is documented in the Content interface.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Children []InterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent `json:"-"`
|
Children []InterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ func (v *InterfaceNestingRootTopicChildrenArticleParentTopic) UnmarshalJSON(b []
|
|||||||
// InterfaceNestingRootTopicChildrenArticleParentTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
// InterfaceNestingRootTopicChildrenArticleParentTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
||||||
type InterfaceNestingRootTopicChildrenArticleParentTopicChildrenArticle struct {
|
type InterfaceNestingRootTopicChildrenArticleParentTopicChildrenArticle struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenArticleParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenArticleParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent() {
|
||||||
@@ -152,7 +152,7 @@ type InterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent interfac
|
|||||||
// InterfaceNestingRootTopicChildrenArticleParentTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopicChildrenArticleParentTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopicChildrenArticleParentTopicChildrenTopic struct {
|
type InterfaceNestingRootTopicChildrenArticleParentTopicChildrenTopic struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenArticleParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenArticleParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent() {
|
||||||
@@ -161,7 +161,7 @@ func (v InterfaceNestingRootTopicChildrenArticleParentTopicChildrenTopic) implem
|
|||||||
// InterfaceNestingRootTopicChildrenArticleParentTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
// InterfaceNestingRootTopicChildrenArticleParentTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
||||||
type InterfaceNestingRootTopicChildrenArticleParentTopicChildrenVideo struct {
|
type InterfaceNestingRootTopicChildrenArticleParentTopicChildrenVideo struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenArticleParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenArticleParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenArticleParentTopicChildrenContent() {
|
||||||
@@ -178,7 +178,7 @@ type InterfaceNestingRootTopicChildrenContent interface {
|
|||||||
// InterfaceNestingRootTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopicChildrenTopic struct {
|
type InterfaceNestingRootTopicChildrenTopic struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Parent InterfaceNestingRootTopicChildrenTopicParentTopic `json:"parent"`
|
Parent InterfaceNestingRootTopicChildrenTopicParentTopic `json:"parent"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ func (v InterfaceNestingRootTopicChildrenTopic) implementsGraphQLInterfaceInterf
|
|||||||
// InterfaceNestingRootTopicChildrenTopicParentTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopicChildrenTopicParentTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopicChildrenTopicParentTopic struct {
|
type InterfaceNestingRootTopicChildrenTopicParentTopic struct {
|
||||||
// ID is documented in the Content interface.
|
// ID is documented in the Content interface.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Children []InterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent `json:"-"`
|
Children []InterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ func (v *InterfaceNestingRootTopicChildrenTopicParentTopic) UnmarshalJSON(b []by
|
|||||||
// InterfaceNestingRootTopicChildrenTopicParentTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
// InterfaceNestingRootTopicChildrenTopicParentTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
||||||
type InterfaceNestingRootTopicChildrenTopicParentTopicChildrenArticle struct {
|
type InterfaceNestingRootTopicChildrenTopicParentTopicChildrenArticle struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent() {
|
||||||
@@ -259,7 +259,7 @@ type InterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent interface
|
|||||||
// InterfaceNestingRootTopicChildrenTopicParentTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopicChildrenTopicParentTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopicChildrenTopicParentTopicChildrenTopic struct {
|
type InterfaceNestingRootTopicChildrenTopicParentTopicChildrenTopic struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent() {
|
||||||
@@ -268,7 +268,7 @@ func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenTopic) implemen
|
|||||||
// InterfaceNestingRootTopicChildrenTopicParentTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
// InterfaceNestingRootTopicChildrenTopicParentTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
||||||
type InterfaceNestingRootTopicChildrenTopicParentTopicChildrenVideo struct {
|
type InterfaceNestingRootTopicChildrenTopicParentTopicChildrenVideo struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenTopicParentTopicChildrenContent() {
|
||||||
@@ -277,7 +277,7 @@ func (v InterfaceNestingRootTopicChildrenTopicParentTopicChildrenVideo) implemen
|
|||||||
// InterfaceNestingRootTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
// InterfaceNestingRootTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
||||||
type InterfaceNestingRootTopicChildrenVideo struct {
|
type InterfaceNestingRootTopicChildrenVideo struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Parent InterfaceNestingRootTopicChildrenVideoParentTopic `json:"parent"`
|
Parent InterfaceNestingRootTopicChildrenVideoParentTopic `json:"parent"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ func (v InterfaceNestingRootTopicChildrenVideo) implementsGraphQLInterfaceInterf
|
|||||||
// InterfaceNestingRootTopicChildrenVideoParentTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopicChildrenVideoParentTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopicChildrenVideoParentTopic struct {
|
type InterfaceNestingRootTopicChildrenVideoParentTopic struct {
|
||||||
// ID is documented in the Content interface.
|
// ID is documented in the Content interface.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Children []InterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent `json:"-"`
|
Children []InterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,7 +341,7 @@ func (v *InterfaceNestingRootTopicChildrenVideoParentTopic) UnmarshalJSON(b []by
|
|||||||
// InterfaceNestingRootTopicChildrenVideoParentTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
// InterfaceNestingRootTopicChildrenVideoParentTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
||||||
type InterfaceNestingRootTopicChildrenVideoParentTopicChildrenArticle struct {
|
type InterfaceNestingRootTopicChildrenVideoParentTopicChildrenArticle struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenVideoParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenVideoParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent() {
|
||||||
@@ -358,7 +358,7 @@ type InterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent interface
|
|||||||
// InterfaceNestingRootTopicChildrenVideoParentTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNestingRootTopicChildrenVideoParentTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNestingRootTopicChildrenVideoParentTopicChildrenTopic struct {
|
type InterfaceNestingRootTopicChildrenVideoParentTopicChildrenTopic struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenVideoParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenVideoParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent() {
|
||||||
@@ -367,7 +367,7 @@ func (v InterfaceNestingRootTopicChildrenVideoParentTopicChildrenTopic) implemen
|
|||||||
// InterfaceNestingRootTopicChildrenVideoParentTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
// InterfaceNestingRootTopicChildrenVideoParentTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
||||||
type InterfaceNestingRootTopicChildrenVideoParentTopicChildrenVideo struct {
|
type InterfaceNestingRootTopicChildrenVideoParentTopicChildrenVideo struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNestingRootTopicChildrenVideoParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent() {
|
func (v InterfaceNestingRootTopicChildrenVideoParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenVideoParentTopicChildrenContent() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InterfaceNoFragmentsQueryResponse is returned by InterfaceNoFragmentsQuery on success.
|
// InterfaceNoFragmentsQueryResponse is returned by InterfaceNoFragmentsQuery on success.
|
||||||
@@ -17,7 +17,7 @@ type InterfaceNoFragmentsQueryResponse struct {
|
|||||||
// InterfaceNoFragmentsQueryRootTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNoFragmentsQueryRootTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNoFragmentsQueryRootTopic struct {
|
type InterfaceNoFragmentsQueryRootTopic struct {
|
||||||
// ID is documented in the Content interface.
|
// ID is documented in the Content interface.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Children []InterfaceNoFragmentsQueryRootTopicChildrenContent `json:"-"`
|
Children []InterfaceNoFragmentsQueryRootTopicChildrenContent `json:"-"`
|
||||||
}
|
}
|
||||||
@@ -72,8 +72,8 @@ func (v *InterfaceNoFragmentsQueryRootTopic) UnmarshalJSON(b []byte) error {
|
|||||||
// InterfaceNoFragmentsQueryRootTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
// InterfaceNoFragmentsQueryRootTopicChildrenArticle includes the requested fields of the GraphQL type Article.
|
||||||
type InterfaceNoFragmentsQueryRootTopicChildrenArticle struct {
|
type InterfaceNoFragmentsQueryRootTopicChildrenArticle struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNoFragmentsQueryRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRootTopicChildrenContent() {
|
func (v InterfaceNoFragmentsQueryRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRootTopicChildrenContent() {
|
||||||
@@ -90,8 +90,8 @@ type InterfaceNoFragmentsQueryRootTopicChildrenContent interface {
|
|||||||
// InterfaceNoFragmentsQueryRootTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
// InterfaceNoFragmentsQueryRootTopicChildrenTopic includes the requested fields of the GraphQL type Topic.
|
||||||
type InterfaceNoFragmentsQueryRootTopicChildrenTopic struct {
|
type InterfaceNoFragmentsQueryRootTopicChildrenTopic struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNoFragmentsQueryRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRootTopicChildrenContent() {
|
func (v InterfaceNoFragmentsQueryRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRootTopicChildrenContent() {
|
||||||
@@ -100,8 +100,8 @@ func (v InterfaceNoFragmentsQueryRootTopicChildrenTopic) implementsGraphQLInterf
|
|||||||
// InterfaceNoFragmentsQueryRootTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
// InterfaceNoFragmentsQueryRootTopicChildrenVideo includes the requested fields of the GraphQL type Video.
|
||||||
type InterfaceNoFragmentsQueryRootTopicChildrenVideo struct {
|
type InterfaceNoFragmentsQueryRootTopicChildrenVideo struct {
|
||||||
// ID is the identifier of the content.
|
// ID is the identifier of the content.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v InterfaceNoFragmentsQueryRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRootTopicChildrenContent() {
|
func (v InterfaceNoFragmentsQueryRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRootTopicChildrenContent() {
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListInputQueryResponse is returned by ListInputQuery on success.
|
// ListInputQueryResponse is returned by ListInputQuery on success.
|
||||||
@@ -24,7 +24,7 @@ type ListInputQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func ListInputQuery(
|
func ListInputQuery(
|
||||||
|
|||||||
+6
-6
@@ -6,7 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OmitEmptyQueryResponse is returned by OmitEmptyQuery on success.
|
// OmitEmptyQueryResponse is returned by OmitEmptyQuery on success.
|
||||||
@@ -29,7 +29,7 @@ type OmitEmptyQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OmitEmptyQueryUsersUser includes the requested fields of the GraphQL type User.
|
// OmitEmptyQueryUsersUser includes the requested fields of the GraphQL type User.
|
||||||
@@ -40,7 +40,7 @@ type OmitEmptyQueryUsersUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role is a type a user may have.
|
// Role is a type a user may have.
|
||||||
@@ -66,9 +66,9 @@ type UserQueryInput struct {
|
|||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// id looks the user up by ID. It's a great way to look up users.
|
// id looks the user up by ID. It's a great way to look up users.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Role Role `json:"role"`
|
Role Role `json:"role"`
|
||||||
Names []string `json:"names"`
|
Names []string `json:"names"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func OmitEmptyQuery(
|
func OmitEmptyQuery(
|
||||||
|
|||||||
+10
-10
@@ -6,7 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PointersQueryOtherUser includes the requested fields of the GraphQL type User.
|
// PointersQueryOtherUser includes the requested fields of the GraphQL type User.
|
||||||
@@ -17,7 +17,7 @@ type PointersQueryOtherUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id *mypkg.ID `json:"id"`
|
Id *testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PointersQueryResponse is returned by PointersQuery on success.
|
// PointersQueryResponse is returned by PointersQuery on success.
|
||||||
@@ -43,11 +43,11 @@ type PointersQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id *mypkg.ID `json:"id"`
|
Id *testutil.ID `json:"id"`
|
||||||
Roles []*Role `json:"roles"`
|
Roles []*Role `json:"roles"`
|
||||||
Name *string `json:"name"`
|
Name *string `json:"name"`
|
||||||
Emails []*string `json:"emails"`
|
Emails []*string `json:"emails"`
|
||||||
EmailsNoPtr []string `json:"emailsNoPtr"`
|
EmailsNoPtr []string `json:"emailsNoPtr"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role is a type a user may have.
|
// Role is a type a user may have.
|
||||||
@@ -73,9 +73,9 @@ type UserQueryInput struct {
|
|||||||
Email *string `json:"email"`
|
Email *string `json:"email"`
|
||||||
Name *string `json:"name"`
|
Name *string `json:"name"`
|
||||||
// id looks the user up by ID. It's a great way to look up users.
|
// id looks the user up by ID. It's a great way to look up users.
|
||||||
Id *mypkg.ID `json:"id"`
|
Id *testutil.ID `json:"id"`
|
||||||
Role *Role `json:"role"`
|
Role *Role `json:"role"`
|
||||||
Names []*string `json:"names"`
|
Names []*string `json:"names"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func PointersQuery(
|
func PointersQuery(
|
||||||
|
|||||||
+10
-10
@@ -6,7 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PointersQueryOtherUser includes the requested fields of the GraphQL type User.
|
// PointersQueryOtherUser includes the requested fields of the GraphQL type User.
|
||||||
@@ -17,7 +17,7 @@ type PointersQueryOtherUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PointersQueryResponse is returned by PointersQuery on success.
|
// PointersQueryResponse is returned by PointersQuery on success.
|
||||||
@@ -43,11 +43,11 @@ type PointersQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Roles []Role `json:"roles"`
|
Roles []Role `json:"roles"`
|
||||||
Name *string `json:"name"`
|
Name *string `json:"name"`
|
||||||
Emails []*string `json:"emails"`
|
Emails []*string `json:"emails"`
|
||||||
EmailsNoPtr []*string `json:"emailsNoPtr"`
|
EmailsNoPtr []*string `json:"emailsNoPtr"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role is a type a user may have.
|
// Role is a type a user may have.
|
||||||
@@ -73,9 +73,9 @@ type UserQueryInput struct {
|
|||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// id looks the user up by ID. It's a great way to look up users.
|
// id looks the user up by ID. It's a great way to look up users.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Role Role `json:"role"`
|
Role Role `json:"role"`
|
||||||
Names []string `json:"names"`
|
Names []string `json:"names"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func PointersQuery(
|
func PointersQuery(
|
||||||
|
|||||||
+3
-3
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryWithAliasResponse is returned by QueryWithAlias on success.
|
// QueryWithAliasResponse is returned by QueryWithAlias on success.
|
||||||
@@ -24,11 +24,11 @@ type QueryWithAliasUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
ID mypkg.ID `json:"ID"`
|
ID testutil.ID `json:"ID"`
|
||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
OtherID mypkg.ID `json:"otherID"`
|
OtherID testutil.ID `json:"otherID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func QueryWithAlias(
|
func QueryWithAlias(
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryWithDoubleAliasResponse is returned by QueryWithDoubleAlias on success.
|
// QueryWithDoubleAliasResponse is returned by QueryWithDoubleAlias on success.
|
||||||
@@ -24,11 +24,11 @@ type QueryWithDoubleAliasUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
ID mypkg.ID `json:"ID"`
|
ID testutil.ID `json:"ID"`
|
||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
AlsoID mypkg.ID `json:"AlsoID"`
|
AlsoID testutil.ID `json:"AlsoID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func QueryWithDoubleAlias(
|
func QueryWithDoubleAlias(
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SimpleInputQueryResponse is returned by SimpleInputQuery on success.
|
// SimpleInputQueryResponse is returned by SimpleInputQuery on success.
|
||||||
@@ -24,7 +24,7 @@ type SimpleInputQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func SimpleInputQuery(
|
func SimpleInputQuery(
|
||||||
|
|||||||
+3
-3
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SimpleMutationCreateUser includes the requested fields of the GraphQL type User.
|
// SimpleMutationCreateUser includes the requested fields of the GraphQL type User.
|
||||||
@@ -15,8 +15,8 @@ type SimpleMutationCreateUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SimpleMutationResponse is returned by SimpleMutation on success.
|
// SimpleMutationResponse is returned by SimpleMutation on success.
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SimpleQueryResponse is returned by SimpleQuery on success.
|
// SimpleQueryResponse is returned by SimpleQuery on success.
|
||||||
@@ -24,7 +24,7 @@ type SimpleQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TypeNameQueryResponse is returned by TypeNameQuery on success.
|
// TypeNameQueryResponse is returned by TypeNameQuery on success.
|
||||||
@@ -25,7 +25,7 @@ type TypeNameQueryUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func TypeNameQuery(
|
func TypeNameQuery(
|
||||||
|
|||||||
+5
-5
@@ -4,7 +4,7 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Khan/genqlient/graphql"
|
"github.com/Khan/genqlient/graphql"
|
||||||
"github.com/me/mypkg"
|
"github.com/Khan/genqlient/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Role is a type a user may have.
|
// Role is a type a user may have.
|
||||||
@@ -38,7 +38,7 @@ type unexportedUser struct {
|
|||||||
// id is the user's ID.
|
// id is the user's ID.
|
||||||
//
|
//
|
||||||
// It is stable, unique, and opaque, like all good IDs.
|
// It is stable, unique, and opaque, like all good IDs.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserQueryInput is the argument to Query.users.
|
// UserQueryInput is the argument to Query.users.
|
||||||
@@ -50,9 +50,9 @@ type userQueryInput struct {
|
|||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// id looks the user up by ID. It's a great way to look up users.
|
// id looks the user up by ID. It's a great way to look up users.
|
||||||
Id mypkg.ID `json:"id"`
|
Id testutil.ID `json:"id"`
|
||||||
Role Role `json:"role"`
|
Role Role `json:"role"`
|
||||||
Names []string `json:"names"`
|
Names []string `json:"names"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func unexported(
|
func unexported(
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package testutil
|
||||||
|
|
||||||
|
type ID string
|
||||||
Reference in New Issue
Block a user