Make output deterministic for graphql interfaces (#209)

We noticed that the output from genqlient can be non-deterministic
when a graphql query queries a field that's an interface. This PR
fixes that by sorting the types as soon as we extract them from
the schema.
This commit is contained in:
Viktor Stanchev
2022-07-28 16:19:53 -07:00
committed by GitHub
parent 03b6b6b5d1
commit 2ae8ea42e5
14 changed files with 529 additions and 524 deletions
+2
View File
@@ -26,6 +26,8 @@ When releasing a new version:
### Bug fixes: ### Bug fixes:
- Fixed non-deterministic generated code when querying graphql interfaces
## v0.5.0 ## v0.5.0
Version 0.5.0 adds several new configuration options and convenience features. Note that genqlient now requires Go 1.16 or higher, and is tested through Go 1.18. Version 0.5.0 adds several new configuration options and convenience features. Note that genqlient now requires Go 1.16 or higher, and is tested through Go 1.18.
+3
View File
@@ -11,6 +11,7 @@ package generate
import ( import (
"fmt" "fmt"
"sort"
"github.com/vektah/gqlparser/v2/ast" "github.com/vektah/gqlparser/v2/ast"
) )
@@ -465,6 +466,8 @@ func (g *generator) convertDefinition(
} }
implementationTypes := g.schema.GetPossibleTypes(def) implementationTypes := g.schema.GetPossibleTypes(def)
// Make sure we generate stable output by sorting the types by name when we get them
sort.Slice(implementationTypes, func(i, j int) bool { return implementationTypes[i].Name < implementationTypes[j].Name })
goType := &goInterfaceType{ goType := &goInterfaceType{
GoName: name, GoName: name,
SharedFields: sharedFields, SharedFields: sharedFields,
@@ -44,8 +44,8 @@ func (v *ComplexInlineFragmentsConflictingStuffArticleThumbnailStuffThumbnail) G
// //
// ComplexInlineFragmentsConflictingStuffContent is implemented by the following types: // ComplexInlineFragmentsConflictingStuffContent is implemented by the following types:
// ComplexInlineFragmentsConflictingStuffArticle // ComplexInlineFragmentsConflictingStuffArticle
// ComplexInlineFragmentsConflictingStuffVideo
// ComplexInlineFragmentsConflictingStuffTopic // ComplexInlineFragmentsConflictingStuffTopic
// ComplexInlineFragmentsConflictingStuffVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -57,10 +57,10 @@ type ComplexInlineFragmentsConflictingStuffContent interface {
func (v *ComplexInlineFragmentsConflictingStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() { func (v *ComplexInlineFragmentsConflictingStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
} }
func (v *ComplexInlineFragmentsConflictingStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
}
func (v *ComplexInlineFragmentsConflictingStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() { func (v *ComplexInlineFragmentsConflictingStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
} }
func (v *ComplexInlineFragmentsConflictingStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
}
func __unmarshalComplexInlineFragmentsConflictingStuffContent(b []byte, v *ComplexInlineFragmentsConflictingStuffContent) error { func __unmarshalComplexInlineFragmentsConflictingStuffContent(b []byte, v *ComplexInlineFragmentsConflictingStuffContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -79,12 +79,12 @@ func __unmarshalComplexInlineFragmentsConflictingStuffContent(b []byte, v *Compl
case "Article": case "Article":
*v = new(ComplexInlineFragmentsConflictingStuffArticle) *v = new(ComplexInlineFragmentsConflictingStuffArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsConflictingStuffVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ComplexInlineFragmentsConflictingStuffTopic) *v = new(ComplexInlineFragmentsConflictingStuffTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsConflictingStuffVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -106,14 +106,6 @@ func __marshalComplexInlineFragmentsConflictingStuffContent(v *ComplexInlineFrag
*ComplexInlineFragmentsConflictingStuffArticle *ComplexInlineFragmentsConflictingStuffArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsConflictingStuffVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsConflictingStuffVideo
}{typename, v}
return json.Marshal(result)
case *ComplexInlineFragmentsConflictingStuffTopic: case *ComplexInlineFragmentsConflictingStuffTopic:
typename = "Topic" typename = "Topic"
@@ -122,6 +114,14 @@ func __marshalComplexInlineFragmentsConflictingStuffContent(v *ComplexInlineFrag
*ComplexInlineFragmentsConflictingStuffTopic *ComplexInlineFragmentsConflictingStuffTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsConflictingStuffVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsConflictingStuffVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -178,8 +178,8 @@ func (v *ComplexInlineFragmentsNestedStuffArticle) GetTypename() string { return
// //
// ComplexInlineFragmentsNestedStuffContent is implemented by the following types: // ComplexInlineFragmentsNestedStuffContent is implemented by the following types:
// ComplexInlineFragmentsNestedStuffArticle // ComplexInlineFragmentsNestedStuffArticle
// ComplexInlineFragmentsNestedStuffVideo
// ComplexInlineFragmentsNestedStuffTopic // ComplexInlineFragmentsNestedStuffTopic
// ComplexInlineFragmentsNestedStuffVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -191,10 +191,10 @@ type ComplexInlineFragmentsNestedStuffContent interface {
func (v *ComplexInlineFragmentsNestedStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() { func (v *ComplexInlineFragmentsNestedStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
} }
func (v *ComplexInlineFragmentsNestedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
}
func (v *ComplexInlineFragmentsNestedStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() { func (v *ComplexInlineFragmentsNestedStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
} }
func (v *ComplexInlineFragmentsNestedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
}
func __unmarshalComplexInlineFragmentsNestedStuffContent(b []byte, v *ComplexInlineFragmentsNestedStuffContent) error { func __unmarshalComplexInlineFragmentsNestedStuffContent(b []byte, v *ComplexInlineFragmentsNestedStuffContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -213,12 +213,12 @@ func __unmarshalComplexInlineFragmentsNestedStuffContent(b []byte, v *ComplexInl
case "Article": case "Article":
*v = new(ComplexInlineFragmentsNestedStuffArticle) *v = new(ComplexInlineFragmentsNestedStuffArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsNestedStuffVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ComplexInlineFragmentsNestedStuffTopic) *v = new(ComplexInlineFragmentsNestedStuffTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsNestedStuffVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -240,14 +240,6 @@ func __marshalComplexInlineFragmentsNestedStuffContent(v *ComplexInlineFragments
*ComplexInlineFragmentsNestedStuffArticle *ComplexInlineFragmentsNestedStuffArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsNestedStuffVideo
}{typename, v}
return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffTopic: case *ComplexInlineFragmentsNestedStuffTopic:
typename = "Topic" typename = "Topic"
@@ -260,6 +252,14 @@ func __marshalComplexInlineFragmentsNestedStuffContent(v *ComplexInlineFragments
*__premarshalComplexInlineFragmentsNestedStuffTopic *__premarshalComplexInlineFragmentsNestedStuffTopic
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsNestedStuffVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -497,8 +497,8 @@ func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParen
// //
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent is implemented by the following types: // ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent is implemented by the following types:
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle // ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic // ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -517,10 +517,10 @@ type ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTop
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() { func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
} }
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
}
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() { func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
} }
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
}
func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent(b []byte, v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent) error { func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent(b []byte, v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -539,12 +539,12 @@ func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentConte
case "Article": case "Article":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle) *v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic) *v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -566,14 +566,6 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContent
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic: case *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic:
typename = "Topic" typename = "Topic"
@@ -582,6 +574,14 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContent
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -656,8 +656,8 @@ func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentTopic) GetPa
// //
// ComplexInlineFragmentsNestedStuffTopicChildrenContent is implemented by the following types: // ComplexInlineFragmentsNestedStuffTopicChildrenContent is implemented by the following types:
// ComplexInlineFragmentsNestedStuffTopicChildrenArticle // ComplexInlineFragmentsNestedStuffTopicChildrenArticle
// ComplexInlineFragmentsNestedStuffTopicChildrenVideo
// ComplexInlineFragmentsNestedStuffTopicChildrenTopic // ComplexInlineFragmentsNestedStuffTopicChildrenTopic
// ComplexInlineFragmentsNestedStuffTopicChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -674,10 +674,10 @@ type ComplexInlineFragmentsNestedStuffTopicChildrenContent interface {
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() { func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
} }
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
}
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() { func (v *ComplexInlineFragmentsNestedStuffTopicChildrenTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
} }
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
}
func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenContent(b []byte, v *ComplexInlineFragmentsNestedStuffTopicChildrenContent) error { func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenContent(b []byte, v *ComplexInlineFragmentsNestedStuffTopicChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -696,12 +696,12 @@ func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenContent(b []byte,
case "Article": case "Article":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticle) *v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenTopic) *v = new(ComplexInlineFragmentsNestedStuffTopicChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -723,14 +723,6 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenContent(v *ComplexIn
*ComplexInlineFragmentsNestedStuffTopicChildrenArticle *ComplexInlineFragmentsNestedStuffTopicChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsNestedStuffTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffTopicChildrenTopic: case *ComplexInlineFragmentsNestedStuffTopicChildrenTopic:
typename = "Topic" typename = "Topic"
@@ -739,6 +731,14 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenContent(v *ComplexIn
*ComplexInlineFragmentsNestedStuffTopicChildrenTopic *ComplexInlineFragmentsNestedStuffTopicChildrenTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsNestedStuffTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsNestedStuffTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -806,8 +806,8 @@ func (v *ComplexInlineFragmentsRandomItemArticle) GetName() string { return v.Na
// //
// ComplexInlineFragmentsRandomItemContent is implemented by the following types: // ComplexInlineFragmentsRandomItemContent is implemented by the following types:
// ComplexInlineFragmentsRandomItemArticle // ComplexInlineFragmentsRandomItemArticle
// ComplexInlineFragmentsRandomItemVideo
// ComplexInlineFragmentsRandomItemTopic // ComplexInlineFragmentsRandomItemTopic
// ComplexInlineFragmentsRandomItemVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -826,10 +826,10 @@ type ComplexInlineFragmentsRandomItemContent interface {
func (v *ComplexInlineFragmentsRandomItemArticle) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() { func (v *ComplexInlineFragmentsRandomItemArticle) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
} }
func (v *ComplexInlineFragmentsRandomItemVideo) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
}
func (v *ComplexInlineFragmentsRandomItemTopic) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() { func (v *ComplexInlineFragmentsRandomItemTopic) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
} }
func (v *ComplexInlineFragmentsRandomItemVideo) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
}
func __unmarshalComplexInlineFragmentsRandomItemContent(b []byte, v *ComplexInlineFragmentsRandomItemContent) error { func __unmarshalComplexInlineFragmentsRandomItemContent(b []byte, v *ComplexInlineFragmentsRandomItemContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -848,12 +848,12 @@ func __unmarshalComplexInlineFragmentsRandomItemContent(b []byte, v *ComplexInli
case "Article": case "Article":
*v = new(ComplexInlineFragmentsRandomItemArticle) *v = new(ComplexInlineFragmentsRandomItemArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsRandomItemVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ComplexInlineFragmentsRandomItemTopic) *v = new(ComplexInlineFragmentsRandomItemTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsRandomItemVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -875,14 +875,6 @@ func __marshalComplexInlineFragmentsRandomItemContent(v *ComplexInlineFragmentsR
*ComplexInlineFragmentsRandomItemArticle *ComplexInlineFragmentsRandomItemArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsRandomItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsRandomItemVideo
}{typename, v}
return json.Marshal(result)
case *ComplexInlineFragmentsRandomItemTopic: case *ComplexInlineFragmentsRandomItemTopic:
typename = "Topic" typename = "Topic"
@@ -891,6 +883,14 @@ func __marshalComplexInlineFragmentsRandomItemContent(v *ComplexInlineFragmentsR
*ComplexInlineFragmentsRandomItemTopic *ComplexInlineFragmentsRandomItemTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsRandomItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsRandomItemVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -975,8 +975,8 @@ func (v *ComplexInlineFragmentsRepeatedStuffArticle) GetOtherName() string { ret
// //
// ComplexInlineFragmentsRepeatedStuffContent is implemented by the following types: // ComplexInlineFragmentsRepeatedStuffContent is implemented by the following types:
// ComplexInlineFragmentsRepeatedStuffArticle // ComplexInlineFragmentsRepeatedStuffArticle
// ComplexInlineFragmentsRepeatedStuffVideo
// ComplexInlineFragmentsRepeatedStuffTopic // ComplexInlineFragmentsRepeatedStuffTopic
// ComplexInlineFragmentsRepeatedStuffVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -1004,10 +1004,10 @@ type ComplexInlineFragmentsRepeatedStuffContent interface {
func (v *ComplexInlineFragmentsRepeatedStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() { func (v *ComplexInlineFragmentsRepeatedStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
} }
func (v *ComplexInlineFragmentsRepeatedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
}
func (v *ComplexInlineFragmentsRepeatedStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() { func (v *ComplexInlineFragmentsRepeatedStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
} }
func (v *ComplexInlineFragmentsRepeatedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
}
func __unmarshalComplexInlineFragmentsRepeatedStuffContent(b []byte, v *ComplexInlineFragmentsRepeatedStuffContent) error { func __unmarshalComplexInlineFragmentsRepeatedStuffContent(b []byte, v *ComplexInlineFragmentsRepeatedStuffContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -1026,12 +1026,12 @@ func __unmarshalComplexInlineFragmentsRepeatedStuffContent(b []byte, v *ComplexI
case "Article": case "Article":
*v = new(ComplexInlineFragmentsRepeatedStuffArticle) *v = new(ComplexInlineFragmentsRepeatedStuffArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsRepeatedStuffVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ComplexInlineFragmentsRepeatedStuffTopic) *v = new(ComplexInlineFragmentsRepeatedStuffTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ComplexInlineFragmentsRepeatedStuffVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -1053,14 +1053,6 @@ func __marshalComplexInlineFragmentsRepeatedStuffContent(v *ComplexInlineFragmen
*ComplexInlineFragmentsRepeatedStuffArticle *ComplexInlineFragmentsRepeatedStuffArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsRepeatedStuffVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsRepeatedStuffVideo
}{typename, v}
return json.Marshal(result)
case *ComplexInlineFragmentsRepeatedStuffTopic: case *ComplexInlineFragmentsRepeatedStuffTopic:
typename = "Topic" typename = "Topic"
@@ -1069,6 +1061,14 @@ func __marshalComplexInlineFragmentsRepeatedStuffContent(v *ComplexInlineFragmen
*ComplexInlineFragmentsRepeatedStuffTopic *ComplexInlineFragmentsRepeatedStuffTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ComplexInlineFragmentsRepeatedStuffVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ComplexInlineFragmentsRepeatedStuffVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -701,8 +701,8 @@ func (v *InnerQueryFragmentRandomItemArticle) __premarshalJSON() (*__premarshalI
// //
// InnerQueryFragmentRandomItemContent is implemented by the following types: // InnerQueryFragmentRandomItemContent is implemented by the following types:
// InnerQueryFragmentRandomItemArticle // InnerQueryFragmentRandomItemArticle
// InnerQueryFragmentRandomItemVideo
// InnerQueryFragmentRandomItemTopic // InnerQueryFragmentRandomItemTopic
// InnerQueryFragmentRandomItemVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -722,10 +722,10 @@ type InnerQueryFragmentRandomItemContent interface {
func (v *InnerQueryFragmentRandomItemArticle) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() { func (v *InnerQueryFragmentRandomItemArticle) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
} }
func (v *InnerQueryFragmentRandomItemVideo) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
}
func (v *InnerQueryFragmentRandomItemTopic) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() { func (v *InnerQueryFragmentRandomItemTopic) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
} }
func (v *InnerQueryFragmentRandomItemVideo) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
}
func __unmarshalInnerQueryFragmentRandomItemContent(b []byte, v *InnerQueryFragmentRandomItemContent) error { func __unmarshalInnerQueryFragmentRandomItemContent(b []byte, v *InnerQueryFragmentRandomItemContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -744,12 +744,12 @@ func __unmarshalInnerQueryFragmentRandomItemContent(b []byte, v *InnerQueryFragm
case "Article": case "Article":
*v = new(InnerQueryFragmentRandomItemArticle) *v = new(InnerQueryFragmentRandomItemArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InnerQueryFragmentRandomItemVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InnerQueryFragmentRandomItemTopic) *v = new(InnerQueryFragmentRandomItemTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InnerQueryFragmentRandomItemVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -775,18 +775,6 @@ func __marshalInnerQueryFragmentRandomItemContent(v *InnerQueryFragmentRandomIte
*__premarshalInnerQueryFragmentRandomItemArticle *__premarshalInnerQueryFragmentRandomItemArticle
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *InnerQueryFragmentRandomItemVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalInnerQueryFragmentRandomItemVideo
}{typename, premarshaled}
return json.Marshal(result)
case *InnerQueryFragmentRandomItemTopic: case *InnerQueryFragmentRandomItemTopic:
typename = "Topic" typename = "Topic"
@@ -799,6 +787,18 @@ func __marshalInnerQueryFragmentRandomItemContent(v *InnerQueryFragmentRandomIte
*__premarshalInnerQueryFragmentRandomItemTopic *__premarshalInnerQueryFragmentRandomItemTopic
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *InnerQueryFragmentRandomItemVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalInnerQueryFragmentRandomItemVideo
}{typename, premarshaled}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -1360,8 +1360,8 @@ func (v *MoreVideoFieldsParentTopicChildrenArticle) GetTypename() *string { retu
// //
// MoreVideoFieldsParentTopicChildrenContent is implemented by the following types: // MoreVideoFieldsParentTopicChildrenContent is implemented by the following types:
// MoreVideoFieldsParentTopicChildrenArticle // MoreVideoFieldsParentTopicChildrenArticle
// MoreVideoFieldsParentTopicChildrenVideo
// MoreVideoFieldsParentTopicChildrenTopic // MoreVideoFieldsParentTopicChildrenTopic
// MoreVideoFieldsParentTopicChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -1373,10 +1373,10 @@ type MoreVideoFieldsParentTopicChildrenContent interface {
func (v *MoreVideoFieldsParentTopicChildrenArticle) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() { func (v *MoreVideoFieldsParentTopicChildrenArticle) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
} }
func (v *MoreVideoFieldsParentTopicChildrenVideo) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
}
func (v *MoreVideoFieldsParentTopicChildrenTopic) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() { func (v *MoreVideoFieldsParentTopicChildrenTopic) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
} }
func (v *MoreVideoFieldsParentTopicChildrenVideo) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
}
func __unmarshalMoreVideoFieldsParentTopicChildrenContent(b []byte, v *MoreVideoFieldsParentTopicChildrenContent) error { func __unmarshalMoreVideoFieldsParentTopicChildrenContent(b []byte, v *MoreVideoFieldsParentTopicChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -1395,12 +1395,12 @@ func __unmarshalMoreVideoFieldsParentTopicChildrenContent(b []byte, v *MoreVideo
case "Article": case "Article":
*v = new(MoreVideoFieldsParentTopicChildrenArticle) *v = new(MoreVideoFieldsParentTopicChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(MoreVideoFieldsParentTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(MoreVideoFieldsParentTopicChildrenTopic) *v = new(MoreVideoFieldsParentTopicChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(MoreVideoFieldsParentTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -1422,6 +1422,14 @@ func __marshalMoreVideoFieldsParentTopicChildrenContent(v *MoreVideoFieldsParent
*MoreVideoFieldsParentTopicChildrenArticle *MoreVideoFieldsParentTopicChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *MoreVideoFieldsParentTopicChildrenTopic:
typename = "Topic"
result := struct {
TypeName string `json:"__typename"`
*MoreVideoFieldsParentTopicChildrenTopic
}{typename, v}
return json.Marshal(result)
case *MoreVideoFieldsParentTopicChildrenVideo: case *MoreVideoFieldsParentTopicChildrenVideo:
typename = "Video" typename = "Video"
@@ -1434,14 +1442,6 @@ func __marshalMoreVideoFieldsParentTopicChildrenContent(v *MoreVideoFieldsParent
*__premarshalMoreVideoFieldsParentTopicChildrenVideo *__premarshalMoreVideoFieldsParentTopicChildrenVideo
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *MoreVideoFieldsParentTopicChildrenTopic:
typename = "Topic"
result := struct {
TypeName string `json:"__typename"`
*MoreVideoFieldsParentTopicChildrenTopic
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -17,8 +17,8 @@ import (
// //
// ContentFields is implemented by the following types: // ContentFields is implemented by the following types:
// ContentFieldsArticle // ContentFieldsArticle
// ContentFieldsVideo
// ContentFieldsTopic // ContentFieldsTopic
// ContentFieldsVideo
type ContentFields interface { type ContentFields interface {
implementsGraphQLInterfaceContentFields() implementsGraphQLInterfaceContentFields()
// GetNext returns the interface-field "next" from its implementation. // GetNext returns the interface-field "next" from its implementation.
@@ -28,8 +28,8 @@ type ContentFields interface {
} }
func (v *ContentFieldsArticle) implementsGraphQLInterfaceContentFields() {} func (v *ContentFieldsArticle) implementsGraphQLInterfaceContentFields() {}
func (v *ContentFieldsVideo) implementsGraphQLInterfaceContentFields() {}
func (v *ContentFieldsTopic) implementsGraphQLInterfaceContentFields() {} func (v *ContentFieldsTopic) implementsGraphQLInterfaceContentFields() {}
func (v *ContentFieldsVideo) implementsGraphQLInterfaceContentFields() {}
func __unmarshalContentFields(b []byte, v *ContentFields) error { func __unmarshalContentFields(b []byte, v *ContentFields) error {
if string(b) == "null" { if string(b) == "null" {
@@ -48,12 +48,12 @@ func __unmarshalContentFields(b []byte, v *ContentFields) error {
case "Article": case "Article":
*v = new(ContentFieldsArticle) *v = new(ContentFieldsArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ContentFieldsVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ContentFieldsTopic) *v = new(ContentFieldsTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ContentFieldsVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -79,18 +79,6 @@ func __marshalContentFields(v *ContentFields) ([]byte, error) {
*__premarshalContentFieldsArticle *__premarshalContentFieldsArticle
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *ContentFieldsVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalContentFieldsVideo
}{typename, premarshaled}
return json.Marshal(result)
case *ContentFieldsTopic: case *ContentFieldsTopic:
typename = "Topic" typename = "Topic"
@@ -103,6 +91,18 @@ func __marshalContentFields(v *ContentFields) ([]byte, error) {
*__premarshalContentFieldsTopic *__premarshalContentFieldsTopic
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *ContentFieldsVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalContentFieldsVideo
}{typename, premarshaled}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -246,8 +246,8 @@ func (v *ContentFieldsNextArticle) GetId() testutil.ID { return v.Id }
// //
// ContentFieldsNextContent is implemented by the following types: // ContentFieldsNextContent is implemented by the following types:
// ContentFieldsNextArticle // ContentFieldsNextArticle
// ContentFieldsNextVideo
// ContentFieldsNextTopic // ContentFieldsNextTopic
// ContentFieldsNextVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -263,8 +263,8 @@ type ContentFieldsNextContent interface {
} }
func (v *ContentFieldsNextArticle) implementsGraphQLInterfaceContentFieldsNextContent() {} func (v *ContentFieldsNextArticle) implementsGraphQLInterfaceContentFieldsNextContent() {}
func (v *ContentFieldsNextVideo) implementsGraphQLInterfaceContentFieldsNextContent() {}
func (v *ContentFieldsNextTopic) implementsGraphQLInterfaceContentFieldsNextContent() {} func (v *ContentFieldsNextTopic) implementsGraphQLInterfaceContentFieldsNextContent() {}
func (v *ContentFieldsNextVideo) implementsGraphQLInterfaceContentFieldsNextContent() {}
func __unmarshalContentFieldsNextContent(b []byte, v *ContentFieldsNextContent) error { func __unmarshalContentFieldsNextContent(b []byte, v *ContentFieldsNextContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -283,12 +283,12 @@ func __unmarshalContentFieldsNextContent(b []byte, v *ContentFieldsNextContent)
case "Article": case "Article":
*v = new(ContentFieldsNextArticle) *v = new(ContentFieldsNextArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ContentFieldsNextVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ContentFieldsNextTopic) *v = new(ContentFieldsNextTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ContentFieldsNextVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -310,14 +310,6 @@ func __marshalContentFieldsNextContent(v *ContentFieldsNextContent) ([]byte, err
*ContentFieldsNextArticle *ContentFieldsNextArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ContentFieldsNextVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ContentFieldsNextVideo
}{typename, v}
return json.Marshal(result)
case *ContentFieldsNextTopic: case *ContentFieldsNextTopic:
typename = "Topic" typename = "Topic"
@@ -326,6 +318,14 @@ func __marshalContentFieldsNextContent(v *ContentFieldsNextContent) ([]byte, err
*ContentFieldsNextTopic *ContentFieldsNextTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ContentFieldsNextVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ContentFieldsNextVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -377,8 +377,8 @@ func (v *ContentFieldsRelatedArticle) GetId() testutil.ID { return v.Id }
// //
// ContentFieldsRelatedContent is implemented by the following types: // ContentFieldsRelatedContent is implemented by the following types:
// ContentFieldsRelatedArticle // ContentFieldsRelatedArticle
// ContentFieldsRelatedVideo
// ContentFieldsRelatedTopic // ContentFieldsRelatedTopic
// ContentFieldsRelatedVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -394,8 +394,8 @@ type ContentFieldsRelatedContent interface {
} }
func (v *ContentFieldsRelatedArticle) implementsGraphQLInterfaceContentFieldsRelatedContent() {} func (v *ContentFieldsRelatedArticle) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
func (v *ContentFieldsRelatedVideo) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
func (v *ContentFieldsRelatedTopic) implementsGraphQLInterfaceContentFieldsRelatedContent() {} func (v *ContentFieldsRelatedTopic) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
func (v *ContentFieldsRelatedVideo) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
func __unmarshalContentFieldsRelatedContent(b []byte, v *ContentFieldsRelatedContent) error { func __unmarshalContentFieldsRelatedContent(b []byte, v *ContentFieldsRelatedContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -414,12 +414,12 @@ func __unmarshalContentFieldsRelatedContent(b []byte, v *ContentFieldsRelatedCon
case "Article": case "Article":
*v = new(ContentFieldsRelatedArticle) *v = new(ContentFieldsRelatedArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ContentFieldsRelatedVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ContentFieldsRelatedTopic) *v = new(ContentFieldsRelatedTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ContentFieldsRelatedVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -441,14 +441,6 @@ func __marshalContentFieldsRelatedContent(v *ContentFieldsRelatedContent) ([]byt
*ContentFieldsRelatedArticle *ContentFieldsRelatedArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ContentFieldsRelatedVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ContentFieldsRelatedVideo
}{typename, v}
return json.Marshal(result)
case *ContentFieldsRelatedTopic: case *ContentFieldsRelatedTopic:
typename = "Topic" typename = "Topic"
@@ -457,6 +449,14 @@ func __marshalContentFieldsRelatedContent(v *ContentFieldsRelatedContent) ([]byt
*ContentFieldsRelatedTopic *ContentFieldsRelatedTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ContentFieldsRelatedVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ContentFieldsRelatedVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -865,8 +865,8 @@ func (v *CovariantInterfaceImplementationRandomItemArticle) __premarshalJSON() (
// //
// CovariantInterfaceImplementationRandomItemContent is implemented by the following types: // CovariantInterfaceImplementationRandomItemContent is implemented by the following types:
// CovariantInterfaceImplementationRandomItemArticle // CovariantInterfaceImplementationRandomItemArticle
// CovariantInterfaceImplementationRandomItemVideo
// CovariantInterfaceImplementationRandomItemTopic // CovariantInterfaceImplementationRandomItemTopic
// CovariantInterfaceImplementationRandomItemVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -887,10 +887,10 @@ type CovariantInterfaceImplementationRandomItemContent interface {
func (v *CovariantInterfaceImplementationRandomItemArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() { func (v *CovariantInterfaceImplementationRandomItemArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
} }
func (v *CovariantInterfaceImplementationRandomItemVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
}
func (v *CovariantInterfaceImplementationRandomItemTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() { func (v *CovariantInterfaceImplementationRandomItemTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
} }
func (v *CovariantInterfaceImplementationRandomItemVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
}
func __unmarshalCovariantInterfaceImplementationRandomItemContent(b []byte, v *CovariantInterfaceImplementationRandomItemContent) error { func __unmarshalCovariantInterfaceImplementationRandomItemContent(b []byte, v *CovariantInterfaceImplementationRandomItemContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -909,12 +909,12 @@ func __unmarshalCovariantInterfaceImplementationRandomItemContent(b []byte, v *C
case "Article": case "Article":
*v = new(CovariantInterfaceImplementationRandomItemArticle) *v = new(CovariantInterfaceImplementationRandomItemArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(CovariantInterfaceImplementationRandomItemVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(CovariantInterfaceImplementationRandomItemTopic) *v = new(CovariantInterfaceImplementationRandomItemTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(CovariantInterfaceImplementationRandomItemVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -940,18 +940,6 @@ func __marshalCovariantInterfaceImplementationRandomItemContent(v *CovariantInte
*__premarshalCovariantInterfaceImplementationRandomItemArticle *__premarshalCovariantInterfaceImplementationRandomItemArticle
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalCovariantInterfaceImplementationRandomItemVideo
}{typename, premarshaled}
return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemTopic: case *CovariantInterfaceImplementationRandomItemTopic:
typename = "Topic" typename = "Topic"
@@ -964,6 +952,18 @@ func __marshalCovariantInterfaceImplementationRandomItemContent(v *CovariantInte
*__premarshalCovariantInterfaceImplementationRandomItemTopic *__premarshalCovariantInterfaceImplementationRandomItemTopic
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalCovariantInterfaceImplementationRandomItemVideo
}{typename, premarshaled}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -1075,8 +1075,8 @@ func (v *CovariantInterfaceImplementationRandomItemContentNextArticle) __premars
// //
// CovariantInterfaceImplementationRandomItemContentNextContent is implemented by the following types: // CovariantInterfaceImplementationRandomItemContentNextContent is implemented by the following types:
// CovariantInterfaceImplementationRandomItemContentNextArticle // CovariantInterfaceImplementationRandomItemContentNextArticle
// CovariantInterfaceImplementationRandomItemContentNextVideo
// CovariantInterfaceImplementationRandomItemContentNextTopic // CovariantInterfaceImplementationRandomItemContentNextTopic
// CovariantInterfaceImplementationRandomItemContentNextVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -1089,10 +1089,10 @@ type CovariantInterfaceImplementationRandomItemContentNextContent interface {
func (v *CovariantInterfaceImplementationRandomItemContentNextArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() { func (v *CovariantInterfaceImplementationRandomItemContentNextArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
} }
func (v *CovariantInterfaceImplementationRandomItemContentNextVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
}
func (v *CovariantInterfaceImplementationRandomItemContentNextTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() { func (v *CovariantInterfaceImplementationRandomItemContentNextTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
} }
func (v *CovariantInterfaceImplementationRandomItemContentNextVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
}
func __unmarshalCovariantInterfaceImplementationRandomItemContentNextContent(b []byte, v *CovariantInterfaceImplementationRandomItemContentNextContent) error { func __unmarshalCovariantInterfaceImplementationRandomItemContentNextContent(b []byte, v *CovariantInterfaceImplementationRandomItemContentNextContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -1111,12 +1111,12 @@ func __unmarshalCovariantInterfaceImplementationRandomItemContentNextContent(b [
case "Article": case "Article":
*v = new(CovariantInterfaceImplementationRandomItemContentNextArticle) *v = new(CovariantInterfaceImplementationRandomItemContentNextArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(CovariantInterfaceImplementationRandomItemContentNextVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(CovariantInterfaceImplementationRandomItemContentNextTopic) *v = new(CovariantInterfaceImplementationRandomItemContentNextTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(CovariantInterfaceImplementationRandomItemContentNextVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -1142,18 +1142,6 @@ func __marshalCovariantInterfaceImplementationRandomItemContentNextContent(v *Co
*__premarshalCovariantInterfaceImplementationRandomItemContentNextArticle *__premarshalCovariantInterfaceImplementationRandomItemContentNextArticle
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemContentNextVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalCovariantInterfaceImplementationRandomItemContentNextVideo
}{typename, premarshaled}
return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemContentNextTopic: case *CovariantInterfaceImplementationRandomItemContentNextTopic:
typename = "Topic" typename = "Topic"
@@ -1166,6 +1154,18 @@ func __marshalCovariantInterfaceImplementationRandomItemContentNextContent(v *Co
*__premarshalCovariantInterfaceImplementationRandomItemContentNextTopic *__premarshalCovariantInterfaceImplementationRandomItemContentNextTopic
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemContentNextVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalCovariantInterfaceImplementationRandomItemContentNextVideo
}{typename, premarshaled}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -1475,8 +1475,8 @@ func (v *CovariantInterfaceImplementationRandomItemContentRelatedArticle) __prem
// //
// CovariantInterfaceImplementationRandomItemContentRelatedContent is implemented by the following types: // CovariantInterfaceImplementationRandomItemContentRelatedContent is implemented by the following types:
// CovariantInterfaceImplementationRandomItemContentRelatedArticle // CovariantInterfaceImplementationRandomItemContentRelatedArticle
// CovariantInterfaceImplementationRandomItemContentRelatedVideo
// CovariantInterfaceImplementationRandomItemContentRelatedTopic // CovariantInterfaceImplementationRandomItemContentRelatedTopic
// CovariantInterfaceImplementationRandomItemContentRelatedVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -1489,10 +1489,10 @@ type CovariantInterfaceImplementationRandomItemContentRelatedContent interface {
func (v *CovariantInterfaceImplementationRandomItemContentRelatedArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() { func (v *CovariantInterfaceImplementationRandomItemContentRelatedArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
} }
func (v *CovariantInterfaceImplementationRandomItemContentRelatedVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
}
func (v *CovariantInterfaceImplementationRandomItemContentRelatedTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() { func (v *CovariantInterfaceImplementationRandomItemContentRelatedTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
} }
func (v *CovariantInterfaceImplementationRandomItemContentRelatedVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
}
func __unmarshalCovariantInterfaceImplementationRandomItemContentRelatedContent(b []byte, v *CovariantInterfaceImplementationRandomItemContentRelatedContent) error { func __unmarshalCovariantInterfaceImplementationRandomItemContentRelatedContent(b []byte, v *CovariantInterfaceImplementationRandomItemContentRelatedContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -1511,12 +1511,12 @@ func __unmarshalCovariantInterfaceImplementationRandomItemContentRelatedContent(
case "Article": case "Article":
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedArticle) *v = new(CovariantInterfaceImplementationRandomItemContentRelatedArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedTopic) *v = new(CovariantInterfaceImplementationRandomItemContentRelatedTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -1542,18 +1542,6 @@ func __marshalCovariantInterfaceImplementationRandomItemContentRelatedContent(v
*__premarshalCovariantInterfaceImplementationRandomItemContentRelatedArticle *__premarshalCovariantInterfaceImplementationRandomItemContentRelatedArticle
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemContentRelatedVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalCovariantInterfaceImplementationRandomItemContentRelatedVideo
}{typename, premarshaled}
return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemContentRelatedTopic: case *CovariantInterfaceImplementationRandomItemContentRelatedTopic:
typename = "Topic" typename = "Topic"
@@ -1566,6 +1554,18 @@ func __marshalCovariantInterfaceImplementationRandomItemContentRelatedContent(v
*__premarshalCovariantInterfaceImplementationRandomItemContentRelatedTopic *__premarshalCovariantInterfaceImplementationRandomItemContentRelatedTopic
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *CovariantInterfaceImplementationRandomItemContentRelatedVideo:
typename = "Video"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalCovariantInterfaceImplementationRandomItemContentRelatedVideo
}{typename, premarshaled}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -145,8 +145,8 @@ func (v *InterfaceListFieldRootTopicChildrenArticle) GetName() string { return v
// //
// InterfaceListFieldRootTopicChildrenContent is implemented by the following types: // InterfaceListFieldRootTopicChildrenContent is implemented by the following types:
// InterfaceListFieldRootTopicChildrenArticle // InterfaceListFieldRootTopicChildrenArticle
// InterfaceListFieldRootTopicChildrenVideo
// InterfaceListFieldRootTopicChildrenTopic // InterfaceListFieldRootTopicChildrenTopic
// InterfaceListFieldRootTopicChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -165,10 +165,10 @@ type InterfaceListFieldRootTopicChildrenContent interface {
func (v *InterfaceListFieldRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() { func (v *InterfaceListFieldRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
} }
func (v *InterfaceListFieldRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
}
func (v *InterfaceListFieldRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() { func (v *InterfaceListFieldRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
} }
func (v *InterfaceListFieldRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
}
func __unmarshalInterfaceListFieldRootTopicChildrenContent(b []byte, v *InterfaceListFieldRootTopicChildrenContent) error { func __unmarshalInterfaceListFieldRootTopicChildrenContent(b []byte, v *InterfaceListFieldRootTopicChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -187,12 +187,12 @@ func __unmarshalInterfaceListFieldRootTopicChildrenContent(b []byte, v *Interfac
case "Article": case "Article":
*v = new(InterfaceListFieldRootTopicChildrenArticle) *v = new(InterfaceListFieldRootTopicChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListFieldRootTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceListFieldRootTopicChildrenTopic) *v = new(InterfaceListFieldRootTopicChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListFieldRootTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -214,14 +214,6 @@ func __marshalInterfaceListFieldRootTopicChildrenContent(v *InterfaceListFieldRo
*InterfaceListFieldRootTopicChildrenArticle *InterfaceListFieldRootTopicChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListFieldRootTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListFieldRootTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceListFieldRootTopicChildrenTopic: case *InterfaceListFieldRootTopicChildrenTopic:
typename = "Topic" typename = "Topic"
@@ -230,6 +222,14 @@ func __marshalInterfaceListFieldRootTopicChildrenContent(v *InterfaceListFieldRo
*InterfaceListFieldRootTopicChildrenTopic *InterfaceListFieldRootTopicChildrenTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListFieldRootTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListFieldRootTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -393,8 +393,8 @@ func (v *InterfaceListFieldWithPointerTopicChildrenArticle) GetName() string { r
// //
// InterfaceListFieldWithPointerTopicChildrenContent is implemented by the following types: // InterfaceListFieldWithPointerTopicChildrenContent is implemented by the following types:
// InterfaceListFieldWithPointerTopicChildrenArticle // InterfaceListFieldWithPointerTopicChildrenArticle
// InterfaceListFieldWithPointerTopicChildrenVideo
// InterfaceListFieldWithPointerTopicChildrenTopic // InterfaceListFieldWithPointerTopicChildrenTopic
// InterfaceListFieldWithPointerTopicChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -413,10 +413,10 @@ type InterfaceListFieldWithPointerTopicChildrenContent interface {
func (v *InterfaceListFieldWithPointerTopicChildrenArticle) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() { func (v *InterfaceListFieldWithPointerTopicChildrenArticle) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
} }
func (v *InterfaceListFieldWithPointerTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
}
func (v *InterfaceListFieldWithPointerTopicChildrenTopic) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() { func (v *InterfaceListFieldWithPointerTopicChildrenTopic) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
} }
func (v *InterfaceListFieldWithPointerTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
}
func __unmarshalInterfaceListFieldWithPointerTopicChildrenContent(b []byte, v *InterfaceListFieldWithPointerTopicChildrenContent) error { func __unmarshalInterfaceListFieldWithPointerTopicChildrenContent(b []byte, v *InterfaceListFieldWithPointerTopicChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -435,12 +435,12 @@ func __unmarshalInterfaceListFieldWithPointerTopicChildrenContent(b []byte, v *I
case "Article": case "Article":
*v = new(InterfaceListFieldWithPointerTopicChildrenArticle) *v = new(InterfaceListFieldWithPointerTopicChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListFieldWithPointerTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceListFieldWithPointerTopicChildrenTopic) *v = new(InterfaceListFieldWithPointerTopicChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListFieldWithPointerTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -462,14 +462,6 @@ func __marshalInterfaceListFieldWithPointerTopicChildrenContent(v *InterfaceList
*InterfaceListFieldWithPointerTopicChildrenArticle *InterfaceListFieldWithPointerTopicChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListFieldWithPointerTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListFieldWithPointerTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceListFieldWithPointerTopicChildrenTopic: case *InterfaceListFieldWithPointerTopicChildrenTopic:
typename = "Topic" typename = "Topic"
@@ -478,6 +470,14 @@ func __marshalInterfaceListFieldWithPointerTopicChildrenContent(v *InterfaceList
*InterfaceListFieldWithPointerTopicChildrenTopic *InterfaceListFieldWithPointerTopicChildrenTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListFieldWithPointerTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListFieldWithPointerTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -14,8 +14,8 @@ import (
// //
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContent is implemented by the following types: // InterfaceListOfListOfListsFieldListOfListsOfListsOfContent is implemented by the following types:
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle // InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic // InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -34,10 +34,10 @@ type InterfaceListOfListOfListsFieldListOfListsOfListsOfContent interface {
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() { func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
} }
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
}
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() { func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
} }
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
}
func __unmarshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(b []byte, v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContent) error { func __unmarshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(b []byte, v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -56,12 +56,12 @@ func __unmarshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(b []b
case "Article": case "Article":
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle) *v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic) *v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -83,14 +83,6 @@ func __marshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(v *Inte
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic: case *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic:
typename = "Topic" typename = "Topic"
@@ -99,6 +91,14 @@ func __marshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(v *Inte
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -379,8 +379,8 @@ func (v *InterfaceListOfListOfListsFieldWithPointerArticle) GetName() *string {
// //
// InterfaceListOfListOfListsFieldWithPointerContent is implemented by the following types: // InterfaceListOfListOfListsFieldWithPointerContent is implemented by the following types:
// InterfaceListOfListOfListsFieldWithPointerArticle // InterfaceListOfListOfListsFieldWithPointerArticle
// InterfaceListOfListOfListsFieldWithPointerVideo
// InterfaceListOfListOfListsFieldWithPointerTopic // InterfaceListOfListOfListsFieldWithPointerTopic
// InterfaceListOfListOfListsFieldWithPointerVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -399,10 +399,10 @@ type InterfaceListOfListOfListsFieldWithPointerContent interface {
func (v *InterfaceListOfListOfListsFieldWithPointerArticle) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() { func (v *InterfaceListOfListOfListsFieldWithPointerArticle) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
} }
func (v *InterfaceListOfListOfListsFieldWithPointerVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
}
func (v *InterfaceListOfListOfListsFieldWithPointerTopic) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() { func (v *InterfaceListOfListOfListsFieldWithPointerTopic) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
} }
func (v *InterfaceListOfListOfListsFieldWithPointerVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
}
func __unmarshalInterfaceListOfListOfListsFieldWithPointerContent(b []byte, v *InterfaceListOfListOfListsFieldWithPointerContent) error { func __unmarshalInterfaceListOfListOfListsFieldWithPointerContent(b []byte, v *InterfaceListOfListOfListsFieldWithPointerContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -421,12 +421,12 @@ func __unmarshalInterfaceListOfListOfListsFieldWithPointerContent(b []byte, v *I
case "Article": case "Article":
*v = new(InterfaceListOfListOfListsFieldWithPointerArticle) *v = new(InterfaceListOfListOfListsFieldWithPointerArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListOfListOfListsFieldWithPointerVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceListOfListOfListsFieldWithPointerTopic) *v = new(InterfaceListOfListOfListsFieldWithPointerTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceListOfListOfListsFieldWithPointerVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -448,14 +448,6 @@ func __marshalInterfaceListOfListOfListsFieldWithPointerContent(v *InterfaceList
*InterfaceListOfListOfListsFieldWithPointerArticle *InterfaceListOfListOfListsFieldWithPointerArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListOfListOfListsFieldWithPointerVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListOfListOfListsFieldWithPointerVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceListOfListOfListsFieldWithPointerTopic: case *InterfaceListOfListOfListsFieldWithPointerTopic:
typename = "Topic" typename = "Topic"
@@ -464,6 +456,14 @@ func __marshalInterfaceListOfListOfListsFieldWithPointerContent(v *InterfaceList
*InterfaceListOfListOfListsFieldWithPointerTopic *InterfaceListOfListOfListsFieldWithPointerTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceListOfListOfListsFieldWithPointerVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceListOfListOfListsFieldWithPointerVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -134,8 +134,8 @@ func (v *InterfaceNestingRootTopicChildrenArticle) GetParent() InterfaceNestingR
// //
// InterfaceNestingRootTopicChildrenContent is implemented by the following types: // InterfaceNestingRootTopicChildrenContent is implemented by the following types:
// InterfaceNestingRootTopicChildrenArticle // InterfaceNestingRootTopicChildrenArticle
// InterfaceNestingRootTopicChildrenVideo
// InterfaceNestingRootTopicChildrenTopic // InterfaceNestingRootTopicChildrenTopic
// InterfaceNestingRootTopicChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -154,10 +154,10 @@ type InterfaceNestingRootTopicChildrenContent interface {
func (v *InterfaceNestingRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() { func (v *InterfaceNestingRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
} }
func (v *InterfaceNestingRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
}
func (v *InterfaceNestingRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() { func (v *InterfaceNestingRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
} }
func (v *InterfaceNestingRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
}
func __unmarshalInterfaceNestingRootTopicChildrenContent(b []byte, v *InterfaceNestingRootTopicChildrenContent) error { func __unmarshalInterfaceNestingRootTopicChildrenContent(b []byte, v *InterfaceNestingRootTopicChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -176,12 +176,12 @@ func __unmarshalInterfaceNestingRootTopicChildrenContent(b []byte, v *InterfaceN
case "Article": case "Article":
*v = new(InterfaceNestingRootTopicChildrenArticle) *v = new(InterfaceNestingRootTopicChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNestingRootTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceNestingRootTopicChildrenTopic) *v = new(InterfaceNestingRootTopicChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNestingRootTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -203,14 +203,6 @@ func __marshalInterfaceNestingRootTopicChildrenContent(v *InterfaceNestingRootTo
*InterfaceNestingRootTopicChildrenArticle *InterfaceNestingRootTopicChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNestingRootTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNestingRootTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceNestingRootTopicChildrenTopic: case *InterfaceNestingRootTopicChildrenTopic:
typename = "Topic" typename = "Topic"
@@ -219,6 +211,14 @@ func __marshalInterfaceNestingRootTopicChildrenContent(v *InterfaceNestingRootTo
*InterfaceNestingRootTopicChildrenTopic *InterfaceNestingRootTopicChildrenTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNestingRootTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNestingRootTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -341,8 +341,8 @@ func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle) Get
// //
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent is implemented by the following types: // InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent is implemented by the following types:
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle // InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic // InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -359,10 +359,10 @@ type InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent interfac
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() { func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
} }
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
}
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() { func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
} }
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
}
func __unmarshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent(b []byte, v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent) error { func __unmarshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent(b []byte, v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -381,12 +381,12 @@ func __unmarshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenConte
case "Article": case "Article":
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle) *v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic) *v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -408,14 +408,6 @@ func __marshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle *InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic: case *InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic:
typename = "Topic" typename = "Topic"
@@ -424,6 +416,14 @@ func __marshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic *InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -31,8 +31,8 @@ func (v *InterfaceNoFragmentsQueryRandomItemArticle) GetName() string { return v
// //
// InterfaceNoFragmentsQueryRandomItemContent is implemented by the following types: // InterfaceNoFragmentsQueryRandomItemContent is implemented by the following types:
// InterfaceNoFragmentsQueryRandomItemArticle // InterfaceNoFragmentsQueryRandomItemArticle
// InterfaceNoFragmentsQueryRandomItemVideo
// InterfaceNoFragmentsQueryRandomItemTopic // InterfaceNoFragmentsQueryRandomItemTopic
// InterfaceNoFragmentsQueryRandomItemVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -51,10 +51,10 @@ type InterfaceNoFragmentsQueryRandomItemContent interface {
func (v *InterfaceNoFragmentsQueryRandomItemArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() { func (v *InterfaceNoFragmentsQueryRandomItemArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
} }
func (v *InterfaceNoFragmentsQueryRandomItemVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
}
func (v *InterfaceNoFragmentsQueryRandomItemTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() { func (v *InterfaceNoFragmentsQueryRandomItemTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
} }
func (v *InterfaceNoFragmentsQueryRandomItemVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
}
func __unmarshalInterfaceNoFragmentsQueryRandomItemContent(b []byte, v *InterfaceNoFragmentsQueryRandomItemContent) error { func __unmarshalInterfaceNoFragmentsQueryRandomItemContent(b []byte, v *InterfaceNoFragmentsQueryRandomItemContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -73,12 +73,12 @@ func __unmarshalInterfaceNoFragmentsQueryRandomItemContent(b []byte, v *Interfac
case "Article": case "Article":
*v = new(InterfaceNoFragmentsQueryRandomItemArticle) *v = new(InterfaceNoFragmentsQueryRandomItemArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNoFragmentsQueryRandomItemVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceNoFragmentsQueryRandomItemTopic) *v = new(InterfaceNoFragmentsQueryRandomItemTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNoFragmentsQueryRandomItemVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -100,14 +100,6 @@ func __marshalInterfaceNoFragmentsQueryRandomItemContent(v *InterfaceNoFragments
*InterfaceNoFragmentsQueryRandomItemArticle *InterfaceNoFragmentsQueryRandomItemArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNoFragmentsQueryRandomItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNoFragmentsQueryRandomItemVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceNoFragmentsQueryRandomItemTopic: case *InterfaceNoFragmentsQueryRandomItemTopic:
typename = "Topic" typename = "Topic"
@@ -116,6 +108,14 @@ func __marshalInterfaceNoFragmentsQueryRandomItemContent(v *InterfaceNoFragments
*InterfaceNoFragmentsQueryRandomItemTopic *InterfaceNoFragmentsQueryRandomItemTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNoFragmentsQueryRandomItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNoFragmentsQueryRandomItemVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -181,8 +181,8 @@ func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle) GetName() strin
// //
// InterfaceNoFragmentsQueryRandomItemWithTypeNameContent is implemented by the following types: // InterfaceNoFragmentsQueryRandomItemWithTypeNameContent is implemented by the following types:
// InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle // InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle
// InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
// InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic // InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic
// InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -201,10 +201,10 @@ type InterfaceNoFragmentsQueryRandomItemWithTypeNameContent interface {
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() { func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
} }
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
}
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() { func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
} }
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
}
func __unmarshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(b []byte, v *InterfaceNoFragmentsQueryRandomItemWithTypeNameContent) error { func __unmarshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(b []byte, v *InterfaceNoFragmentsQueryRandomItemWithTypeNameContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -223,12 +223,12 @@ func __unmarshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(b []byte,
case "Article": case "Article":
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle) *v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic) *v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -250,14 +250,6 @@ func __marshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(v *Interfac
*InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle *InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic: case *InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic:
typename = "Topic" typename = "Topic"
@@ -266,6 +258,14 @@ func __marshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(v *Interfac
*InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic *InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -499,8 +499,8 @@ func (v *InterfaceNoFragmentsQueryWithPointerArticle) GetName() *string { return
// //
// InterfaceNoFragmentsQueryWithPointerContent is implemented by the following types: // InterfaceNoFragmentsQueryWithPointerContent is implemented by the following types:
// InterfaceNoFragmentsQueryWithPointerArticle // InterfaceNoFragmentsQueryWithPointerArticle
// InterfaceNoFragmentsQueryWithPointerVideo
// InterfaceNoFragmentsQueryWithPointerTopic // InterfaceNoFragmentsQueryWithPointerTopic
// InterfaceNoFragmentsQueryWithPointerVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -519,10 +519,10 @@ type InterfaceNoFragmentsQueryWithPointerContent interface {
func (v *InterfaceNoFragmentsQueryWithPointerArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() { func (v *InterfaceNoFragmentsQueryWithPointerArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
} }
func (v *InterfaceNoFragmentsQueryWithPointerVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
}
func (v *InterfaceNoFragmentsQueryWithPointerTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() { func (v *InterfaceNoFragmentsQueryWithPointerTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
} }
func (v *InterfaceNoFragmentsQueryWithPointerVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
}
func __unmarshalInterfaceNoFragmentsQueryWithPointerContent(b []byte, v *InterfaceNoFragmentsQueryWithPointerContent) error { func __unmarshalInterfaceNoFragmentsQueryWithPointerContent(b []byte, v *InterfaceNoFragmentsQueryWithPointerContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -541,12 +541,12 @@ func __unmarshalInterfaceNoFragmentsQueryWithPointerContent(b []byte, v *Interfa
case "Article": case "Article":
*v = new(InterfaceNoFragmentsQueryWithPointerArticle) *v = new(InterfaceNoFragmentsQueryWithPointerArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNoFragmentsQueryWithPointerVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(InterfaceNoFragmentsQueryWithPointerTopic) *v = new(InterfaceNoFragmentsQueryWithPointerTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(InterfaceNoFragmentsQueryWithPointerVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -568,14 +568,6 @@ func __marshalInterfaceNoFragmentsQueryWithPointerContent(v *InterfaceNoFragment
*InterfaceNoFragmentsQueryWithPointerArticle *InterfaceNoFragmentsQueryWithPointerArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNoFragmentsQueryWithPointerVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNoFragmentsQueryWithPointerVideo
}{typename, v}
return json.Marshal(result)
case *InterfaceNoFragmentsQueryWithPointerTopic: case *InterfaceNoFragmentsQueryWithPointerTopic:
typename = "Topic" typename = "Topic"
@@ -584,6 +576,14 @@ func __marshalInterfaceNoFragmentsQueryWithPointerContent(v *InterfaceNoFragment
*InterfaceNoFragmentsQueryWithPointerTopic *InterfaceNoFragmentsQueryWithPointerTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InterfaceNoFragmentsQueryWithPointerVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*InterfaceNoFragmentsQueryWithPointerVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -35,8 +35,8 @@ func (v *SimpleInlineFragmentRandomItemArticle) GetText() string { return v.Text
// //
// SimpleInlineFragmentRandomItemContent is implemented by the following types: // SimpleInlineFragmentRandomItemContent is implemented by the following types:
// SimpleInlineFragmentRandomItemArticle // SimpleInlineFragmentRandomItemArticle
// SimpleInlineFragmentRandomItemVideo
// SimpleInlineFragmentRandomItemTopic // SimpleInlineFragmentRandomItemTopic
// SimpleInlineFragmentRandomItemVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -55,10 +55,10 @@ type SimpleInlineFragmentRandomItemContent interface {
func (v *SimpleInlineFragmentRandomItemArticle) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() { func (v *SimpleInlineFragmentRandomItemArticle) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
} }
func (v *SimpleInlineFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
}
func (v *SimpleInlineFragmentRandomItemTopic) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() { func (v *SimpleInlineFragmentRandomItemTopic) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
} }
func (v *SimpleInlineFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
}
func __unmarshalSimpleInlineFragmentRandomItemContent(b []byte, v *SimpleInlineFragmentRandomItemContent) error { func __unmarshalSimpleInlineFragmentRandomItemContent(b []byte, v *SimpleInlineFragmentRandomItemContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -77,12 +77,12 @@ func __unmarshalSimpleInlineFragmentRandomItemContent(b []byte, v *SimpleInlineF
case "Article": case "Article":
*v = new(SimpleInlineFragmentRandomItemArticle) *v = new(SimpleInlineFragmentRandomItemArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(SimpleInlineFragmentRandomItemVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(SimpleInlineFragmentRandomItemTopic) *v = new(SimpleInlineFragmentRandomItemTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(SimpleInlineFragmentRandomItemVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -104,14 +104,6 @@ func __marshalSimpleInlineFragmentRandomItemContent(v *SimpleInlineFragmentRando
*SimpleInlineFragmentRandomItemArticle *SimpleInlineFragmentRandomItemArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *SimpleInlineFragmentRandomItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*SimpleInlineFragmentRandomItemVideo
}{typename, v}
return json.Marshal(result)
case *SimpleInlineFragmentRandomItemTopic: case *SimpleInlineFragmentRandomItemTopic:
typename = "Topic" typename = "Topic"
@@ -120,6 +112,14 @@ func __marshalSimpleInlineFragmentRandomItemContent(v *SimpleInlineFragmentRando
*SimpleInlineFragmentRandomItemTopic *SimpleInlineFragmentRandomItemTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *SimpleInlineFragmentRandomItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*SimpleInlineFragmentRandomItemVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -31,8 +31,8 @@ func (v *SimpleNamedFragmentRandomItemArticle) GetName() string { return v.Name
// //
// SimpleNamedFragmentRandomItemContent is implemented by the following types: // SimpleNamedFragmentRandomItemContent is implemented by the following types:
// SimpleNamedFragmentRandomItemArticle // SimpleNamedFragmentRandomItemArticle
// SimpleNamedFragmentRandomItemVideo
// SimpleNamedFragmentRandomItemTopic // SimpleNamedFragmentRandomItemTopic
// SimpleNamedFragmentRandomItemVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -51,10 +51,10 @@ type SimpleNamedFragmentRandomItemContent interface {
func (v *SimpleNamedFragmentRandomItemArticle) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() { func (v *SimpleNamedFragmentRandomItemArticle) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
} }
func (v *SimpleNamedFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
}
func (v *SimpleNamedFragmentRandomItemTopic) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() { func (v *SimpleNamedFragmentRandomItemTopic) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
} }
func (v *SimpleNamedFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
}
func __unmarshalSimpleNamedFragmentRandomItemContent(b []byte, v *SimpleNamedFragmentRandomItemContent) error { func __unmarshalSimpleNamedFragmentRandomItemContent(b []byte, v *SimpleNamedFragmentRandomItemContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -73,12 +73,12 @@ func __unmarshalSimpleNamedFragmentRandomItemContent(b []byte, v *SimpleNamedFra
case "Article": case "Article":
*v = new(SimpleNamedFragmentRandomItemArticle) *v = new(SimpleNamedFragmentRandomItemArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(SimpleNamedFragmentRandomItemVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(SimpleNamedFragmentRandomItemTopic) *v = new(SimpleNamedFragmentRandomItemTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(SimpleNamedFragmentRandomItemVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -100,6 +100,14 @@ func __marshalSimpleNamedFragmentRandomItemContent(v *SimpleNamedFragmentRandomI
*SimpleNamedFragmentRandomItemArticle *SimpleNamedFragmentRandomItemArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *SimpleNamedFragmentRandomItemTopic:
typename = "Topic"
result := struct {
TypeName string `json:"__typename"`
*SimpleNamedFragmentRandomItemTopic
}{typename, v}
return json.Marshal(result)
case *SimpleNamedFragmentRandomItemVideo: case *SimpleNamedFragmentRandomItemVideo:
typename = "Video" typename = "Video"
@@ -112,14 +120,6 @@ func __marshalSimpleNamedFragmentRandomItemContent(v *SimpleNamedFragmentRandomI
*__premarshalSimpleNamedFragmentRandomItemVideo *__premarshalSimpleNamedFragmentRandomItemVideo
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *SimpleNamedFragmentRandomItemTopic:
typename = "Topic"
result := struct {
TypeName string `json:"__typename"`
*SimpleNamedFragmentRandomItemTopic
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -220,8 +220,8 @@ func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle
// //
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent is implemented by the following types: // StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent is implemented by the following types:
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle // StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic // StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -238,10 +238,10 @@ type StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent int
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() { func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
} }
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
}
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() { func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
} }
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
}
func __unmarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent(b []byte, v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent) error { func __unmarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent(b []byte, v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent) error {
if string(b) == "null" { if string(b) == "null" {
@@ -260,12 +260,12 @@ func __unmarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildren
case "Article": case "Article":
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle) *v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic) *v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -287,6 +287,14 @@ func __marshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenCo
*StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic:
typename = "Topic"
result := struct {
TypeName string `json:"__typename"`
*StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic
}{typename, v}
return json.Marshal(result)
case *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo: case *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo:
typename = "Video" typename = "Video"
@@ -299,14 +307,6 @@ func __marshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenCo
*__premarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo *__premarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic:
typename = "Topic"
result := struct {
TypeName string `json:"__typename"`
*StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -14,8 +14,8 @@ import (
// //
// Item is implemented by the following types: // Item is implemented by the following types:
// ItemArticle // ItemArticle
// ItemVideo
// ItemTopic // ItemTopic
// ItemVideo
// The GraphQL type's documentation follows. // The GraphQL type's documentation follows.
// //
// Content is implemented by various types like Article, Video, and Topic. // Content is implemented by various types like Article, Video, and Topic.
@@ -33,8 +33,8 @@ type Item interface {
} }
func (v *ItemArticle) implementsGraphQLInterfaceItem() {} func (v *ItemArticle) implementsGraphQLInterfaceItem() {}
func (v *ItemVideo) implementsGraphQLInterfaceItem() {}
func (v *ItemTopic) implementsGraphQLInterfaceItem() {} func (v *ItemTopic) implementsGraphQLInterfaceItem() {}
func (v *ItemVideo) implementsGraphQLInterfaceItem() {}
func __unmarshalItem(b []byte, v *Item) error { func __unmarshalItem(b []byte, v *Item) error {
if string(b) == "null" { if string(b) == "null" {
@@ -53,12 +53,12 @@ func __unmarshalItem(b []byte, v *Item) error {
case "Article": case "Article":
*v = new(ItemArticle) *v = new(ItemArticle)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ItemVideo)
return json.Unmarshal(b, *v)
case "Topic": case "Topic":
*v = new(ItemTopic) *v = new(ItemTopic)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "Video":
*v = new(ItemVideo)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Content.__typename") "response was missing Content.__typename")
@@ -80,14 +80,6 @@ func __marshalItem(v *Item) ([]byte, error) {
*ItemArticle *ItemArticle
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ItemVideo
}{typename, v}
return json.Marshal(result)
case *ItemTopic: case *ItemTopic:
typename = "Topic" typename = "Topic"
@@ -96,6 +88,14 @@ func __marshalItem(v *Item) ([]byte, error) {
*ItemTopic *ItemTopic
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *ItemVideo:
typename = "Video"
result := struct {
TypeName string `json:"__typename"`
*ItemVideo
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
+130 -130
View File
@@ -120,8 +120,8 @@ func (v *AnimalFieldsOwnerAnimal) GetId() string { return v.Id }
// AnimalFieldsOwnerBeing includes the requested fields of the GraphQL interface Being. // AnimalFieldsOwnerBeing includes the requested fields of the GraphQL interface Being.
// //
// AnimalFieldsOwnerBeing is implemented by the following types: // AnimalFieldsOwnerBeing is implemented by the following types:
// AnimalFieldsOwnerUser
// AnimalFieldsOwnerAnimal // AnimalFieldsOwnerAnimal
// AnimalFieldsOwnerUser
type AnimalFieldsOwnerBeing interface { type AnimalFieldsOwnerBeing interface {
implementsGraphQLInterfaceAnimalFieldsOwnerBeing() implementsGraphQLInterfaceAnimalFieldsOwnerBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -130,8 +130,8 @@ type AnimalFieldsOwnerBeing interface {
GetId() string GetId() string
} }
func (v *AnimalFieldsOwnerUser) implementsGraphQLInterfaceAnimalFieldsOwnerBeing() {}
func (v *AnimalFieldsOwnerAnimal) implementsGraphQLInterfaceAnimalFieldsOwnerBeing() {} func (v *AnimalFieldsOwnerAnimal) implementsGraphQLInterfaceAnimalFieldsOwnerBeing() {}
func (v *AnimalFieldsOwnerUser) implementsGraphQLInterfaceAnimalFieldsOwnerBeing() {}
func __unmarshalAnimalFieldsOwnerBeing(b []byte, v *AnimalFieldsOwnerBeing) error { func __unmarshalAnimalFieldsOwnerBeing(b []byte, v *AnimalFieldsOwnerBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -147,12 +147,12 @@ func __unmarshalAnimalFieldsOwnerBeing(b []byte, v *AnimalFieldsOwnerBeing) erro
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(AnimalFieldsOwnerUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(AnimalFieldsOwnerAnimal) *v = new(AnimalFieldsOwnerAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(AnimalFieldsOwnerUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -166,6 +166,14 @@ func __marshalAnimalFieldsOwnerBeing(v *AnimalFieldsOwnerBeing) ([]byte, error)
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *AnimalFieldsOwnerAnimal:
typename = "Animal"
result := struct {
TypeName string `json:"__typename"`
*AnimalFieldsOwnerAnimal
}{typename, v}
return json.Marshal(result)
case *AnimalFieldsOwnerUser: case *AnimalFieldsOwnerUser:
typename = "User" typename = "User"
@@ -178,14 +186,6 @@ func __marshalAnimalFieldsOwnerBeing(v *AnimalFieldsOwnerBeing) ([]byte, error)
*__premarshalAnimalFieldsOwnerUser *__premarshalAnimalFieldsOwnerUser
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *AnimalFieldsOwnerAnimal:
typename = "Animal"
result := struct {
TypeName string `json:"__typename"`
*AnimalFieldsOwnerAnimal
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -287,8 +287,8 @@ func (v *FriendsFields) GetName() string { return v.Name }
// InnerBeingFields includes the GraphQL fields of Being requested by the fragment InnerBeingFields. // InnerBeingFields includes the GraphQL fields of Being requested by the fragment InnerBeingFields.
// //
// InnerBeingFields is implemented by the following types: // InnerBeingFields is implemented by the following types:
// InnerBeingFieldsUser
// InnerBeingFieldsAnimal // InnerBeingFieldsAnimal
// InnerBeingFieldsUser
type InnerBeingFields interface { type InnerBeingFields interface {
implementsGraphQLInterfaceInnerBeingFields() implementsGraphQLInterfaceInnerBeingFields()
// GetId returns the interface-field "id" from its implementation. // GetId returns the interface-field "id" from its implementation.
@@ -297,8 +297,8 @@ type InnerBeingFields interface {
GetName() string GetName() string
} }
func (v *InnerBeingFieldsUser) implementsGraphQLInterfaceInnerBeingFields() {}
func (v *InnerBeingFieldsAnimal) implementsGraphQLInterfaceInnerBeingFields() {} func (v *InnerBeingFieldsAnimal) implementsGraphQLInterfaceInnerBeingFields() {}
func (v *InnerBeingFieldsUser) implementsGraphQLInterfaceInnerBeingFields() {}
func __unmarshalInnerBeingFields(b []byte, v *InnerBeingFields) error { func __unmarshalInnerBeingFields(b []byte, v *InnerBeingFields) error {
if string(b) == "null" { if string(b) == "null" {
@@ -314,12 +314,12 @@ func __unmarshalInnerBeingFields(b []byte, v *InnerBeingFields) error {
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(InnerBeingFieldsUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(InnerBeingFieldsAnimal) *v = new(InnerBeingFieldsAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(InnerBeingFieldsUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -333,14 +333,6 @@ func __marshalInnerBeingFields(v *InnerBeingFields) ([]byte, error) {
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *InnerBeingFieldsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*InnerBeingFieldsUser
}{typename, v}
return json.Marshal(result)
case *InnerBeingFieldsAnimal: case *InnerBeingFieldsAnimal:
typename = "Animal" typename = "Animal"
@@ -349,6 +341,14 @@ func __marshalInnerBeingFields(v *InnerBeingFields) ([]byte, error) {
*InnerBeingFieldsAnimal *InnerBeingFieldsAnimal
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *InnerBeingFieldsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*InnerBeingFieldsUser
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -776,8 +776,8 @@ func (v *QueryFragmentBeingsAnimal) __premarshalJSON() (*__premarshalQueryFragme
// QueryFragmentBeingsBeing includes the requested fields of the GraphQL interface Being. // QueryFragmentBeingsBeing includes the requested fields of the GraphQL interface Being.
// //
// QueryFragmentBeingsBeing is implemented by the following types: // QueryFragmentBeingsBeing is implemented by the following types:
// QueryFragmentBeingsUser
// QueryFragmentBeingsAnimal // QueryFragmentBeingsAnimal
// QueryFragmentBeingsUser
type QueryFragmentBeingsBeing interface { type QueryFragmentBeingsBeing interface {
implementsGraphQLInterfaceQueryFragmentBeingsBeing() implementsGraphQLInterfaceQueryFragmentBeingsBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -786,8 +786,8 @@ type QueryFragmentBeingsBeing interface {
GetId() string GetId() string
} }
func (v *QueryFragmentBeingsUser) implementsGraphQLInterfaceQueryFragmentBeingsBeing() {}
func (v *QueryFragmentBeingsAnimal) implementsGraphQLInterfaceQueryFragmentBeingsBeing() {} func (v *QueryFragmentBeingsAnimal) implementsGraphQLInterfaceQueryFragmentBeingsBeing() {}
func (v *QueryFragmentBeingsUser) implementsGraphQLInterfaceQueryFragmentBeingsBeing() {}
func __unmarshalQueryFragmentBeingsBeing(b []byte, v *QueryFragmentBeingsBeing) error { func __unmarshalQueryFragmentBeingsBeing(b []byte, v *QueryFragmentBeingsBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -803,12 +803,12 @@ func __unmarshalQueryFragmentBeingsBeing(b []byte, v *QueryFragmentBeingsBeing)
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(QueryFragmentBeingsUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(QueryFragmentBeingsAnimal) *v = new(QueryFragmentBeingsAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(QueryFragmentBeingsUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -822,18 +822,6 @@ func __marshalQueryFragmentBeingsBeing(v *QueryFragmentBeingsBeing) ([]byte, err
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *QueryFragmentBeingsUser:
typename = "User"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalQueryFragmentBeingsUser
}{typename, premarshaled}
return json.Marshal(result)
case *QueryFragmentBeingsAnimal: case *QueryFragmentBeingsAnimal:
typename = "Animal" typename = "Animal"
@@ -846,6 +834,18 @@ func __marshalQueryFragmentBeingsBeing(v *QueryFragmentBeingsBeing) ([]byte, err
*__premarshalQueryFragmentBeingsAnimal *__premarshalQueryFragmentBeingsAnimal
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *QueryFragmentBeingsUser:
typename = "User"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalQueryFragmentBeingsUser
}{typename, premarshaled}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -1769,8 +1769,8 @@ func (v *queryWithFragmentsBeingsAnimalOwnerAnimal) GetName() string { return v.
// queryWithFragmentsBeingsAnimalOwnerBeing includes the requested fields of the GraphQL interface Being. // queryWithFragmentsBeingsAnimalOwnerBeing includes the requested fields of the GraphQL interface Being.
// //
// queryWithFragmentsBeingsAnimalOwnerBeing is implemented by the following types: // queryWithFragmentsBeingsAnimalOwnerBeing is implemented by the following types:
// queryWithFragmentsBeingsAnimalOwnerUser
// queryWithFragmentsBeingsAnimalOwnerAnimal // queryWithFragmentsBeingsAnimalOwnerAnimal
// queryWithFragmentsBeingsAnimalOwnerUser
type queryWithFragmentsBeingsAnimalOwnerBeing interface { type queryWithFragmentsBeingsAnimalOwnerBeing interface {
implementsGraphQLInterfacequeryWithFragmentsBeingsAnimalOwnerBeing() implementsGraphQLInterfacequeryWithFragmentsBeingsAnimalOwnerBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -1781,10 +1781,10 @@ type queryWithFragmentsBeingsAnimalOwnerBeing interface {
GetName() string GetName() string
} }
func (v *queryWithFragmentsBeingsAnimalOwnerUser) implementsGraphQLInterfacequeryWithFragmentsBeingsAnimalOwnerBeing() {
}
func (v *queryWithFragmentsBeingsAnimalOwnerAnimal) implementsGraphQLInterfacequeryWithFragmentsBeingsAnimalOwnerBeing() { func (v *queryWithFragmentsBeingsAnimalOwnerAnimal) implementsGraphQLInterfacequeryWithFragmentsBeingsAnimalOwnerBeing() {
} }
func (v *queryWithFragmentsBeingsAnimalOwnerUser) implementsGraphQLInterfacequeryWithFragmentsBeingsAnimalOwnerBeing() {
}
func __unmarshalqueryWithFragmentsBeingsAnimalOwnerBeing(b []byte, v *queryWithFragmentsBeingsAnimalOwnerBeing) error { func __unmarshalqueryWithFragmentsBeingsAnimalOwnerBeing(b []byte, v *queryWithFragmentsBeingsAnimalOwnerBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -1800,12 +1800,12 @@ func __unmarshalqueryWithFragmentsBeingsAnimalOwnerBeing(b []byte, v *queryWithF
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(queryWithFragmentsBeingsAnimalOwnerUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(queryWithFragmentsBeingsAnimalOwnerAnimal) *v = new(queryWithFragmentsBeingsAnimalOwnerAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(queryWithFragmentsBeingsAnimalOwnerUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -1819,14 +1819,6 @@ func __marshalqueryWithFragmentsBeingsAnimalOwnerBeing(v *queryWithFragmentsBein
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *queryWithFragmentsBeingsAnimalOwnerUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithFragmentsBeingsAnimalOwnerUser
}{typename, v}
return json.Marshal(result)
case *queryWithFragmentsBeingsAnimalOwnerAnimal: case *queryWithFragmentsBeingsAnimalOwnerAnimal:
typename = "Animal" typename = "Animal"
@@ -1835,6 +1827,14 @@ func __marshalqueryWithFragmentsBeingsAnimalOwnerBeing(v *queryWithFragmentsBein
*queryWithFragmentsBeingsAnimalOwnerAnimal *queryWithFragmentsBeingsAnimalOwnerAnimal
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *queryWithFragmentsBeingsAnimalOwnerUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithFragmentsBeingsAnimalOwnerUser
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -1866,8 +1866,8 @@ func (v *queryWithFragmentsBeingsAnimalOwnerUser) GetLuckyNumber() int { return
// queryWithFragmentsBeingsBeing includes the requested fields of the GraphQL interface Being. // queryWithFragmentsBeingsBeing includes the requested fields of the GraphQL interface Being.
// //
// queryWithFragmentsBeingsBeing is implemented by the following types: // queryWithFragmentsBeingsBeing is implemented by the following types:
// queryWithFragmentsBeingsUser
// queryWithFragmentsBeingsAnimal // queryWithFragmentsBeingsAnimal
// queryWithFragmentsBeingsUser
type queryWithFragmentsBeingsBeing interface { type queryWithFragmentsBeingsBeing interface {
implementsGraphQLInterfacequeryWithFragmentsBeingsBeing() implementsGraphQLInterfacequeryWithFragmentsBeingsBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -1878,8 +1878,8 @@ type queryWithFragmentsBeingsBeing interface {
GetName() string GetName() string
} }
func (v *queryWithFragmentsBeingsUser) implementsGraphQLInterfacequeryWithFragmentsBeingsBeing() {}
func (v *queryWithFragmentsBeingsAnimal) implementsGraphQLInterfacequeryWithFragmentsBeingsBeing() {} func (v *queryWithFragmentsBeingsAnimal) implementsGraphQLInterfacequeryWithFragmentsBeingsBeing() {}
func (v *queryWithFragmentsBeingsUser) implementsGraphQLInterfacequeryWithFragmentsBeingsBeing() {}
func __unmarshalqueryWithFragmentsBeingsBeing(b []byte, v *queryWithFragmentsBeingsBeing) error { func __unmarshalqueryWithFragmentsBeingsBeing(b []byte, v *queryWithFragmentsBeingsBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -1895,12 +1895,12 @@ func __unmarshalqueryWithFragmentsBeingsBeing(b []byte, v *queryWithFragmentsBei
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(queryWithFragmentsBeingsUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(queryWithFragmentsBeingsAnimal) *v = new(queryWithFragmentsBeingsAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(queryWithFragmentsBeingsUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -1914,14 +1914,6 @@ func __marshalqueryWithFragmentsBeingsBeing(v *queryWithFragmentsBeingsBeing) ([
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *queryWithFragmentsBeingsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithFragmentsBeingsUser
}{typename, v}
return json.Marshal(result)
case *queryWithFragmentsBeingsAnimal: case *queryWithFragmentsBeingsAnimal:
typename = "Animal" typename = "Animal"
@@ -1934,6 +1926,14 @@ func __marshalqueryWithFragmentsBeingsBeing(v *queryWithFragmentsBeingsBeing) ([
*__premarshalqueryWithFragmentsBeingsAnimal *__premarshalqueryWithFragmentsBeingsAnimal
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *queryWithFragmentsBeingsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithFragmentsBeingsUser
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -2076,8 +2076,8 @@ func (v *queryWithInterfaceListFieldBeingsAnimal) GetName() string { return v.Na
// queryWithInterfaceListFieldBeingsBeing includes the requested fields of the GraphQL interface Being. // queryWithInterfaceListFieldBeingsBeing includes the requested fields of the GraphQL interface Being.
// //
// queryWithInterfaceListFieldBeingsBeing is implemented by the following types: // queryWithInterfaceListFieldBeingsBeing is implemented by the following types:
// queryWithInterfaceListFieldBeingsUser
// queryWithInterfaceListFieldBeingsAnimal // queryWithInterfaceListFieldBeingsAnimal
// queryWithInterfaceListFieldBeingsUser
type queryWithInterfaceListFieldBeingsBeing interface { type queryWithInterfaceListFieldBeingsBeing interface {
implementsGraphQLInterfacequeryWithInterfaceListFieldBeingsBeing() implementsGraphQLInterfacequeryWithInterfaceListFieldBeingsBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -2088,10 +2088,10 @@ type queryWithInterfaceListFieldBeingsBeing interface {
GetName() string GetName() string
} }
func (v *queryWithInterfaceListFieldBeingsUser) implementsGraphQLInterfacequeryWithInterfaceListFieldBeingsBeing() {
}
func (v *queryWithInterfaceListFieldBeingsAnimal) implementsGraphQLInterfacequeryWithInterfaceListFieldBeingsBeing() { func (v *queryWithInterfaceListFieldBeingsAnimal) implementsGraphQLInterfacequeryWithInterfaceListFieldBeingsBeing() {
} }
func (v *queryWithInterfaceListFieldBeingsUser) implementsGraphQLInterfacequeryWithInterfaceListFieldBeingsBeing() {
}
func __unmarshalqueryWithInterfaceListFieldBeingsBeing(b []byte, v *queryWithInterfaceListFieldBeingsBeing) error { func __unmarshalqueryWithInterfaceListFieldBeingsBeing(b []byte, v *queryWithInterfaceListFieldBeingsBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -2107,12 +2107,12 @@ func __unmarshalqueryWithInterfaceListFieldBeingsBeing(b []byte, v *queryWithInt
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(queryWithInterfaceListFieldBeingsUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(queryWithInterfaceListFieldBeingsAnimal) *v = new(queryWithInterfaceListFieldBeingsAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(queryWithInterfaceListFieldBeingsUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -2126,14 +2126,6 @@ func __marshalqueryWithInterfaceListFieldBeingsBeing(v *queryWithInterfaceListFi
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *queryWithInterfaceListFieldBeingsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithInterfaceListFieldBeingsUser
}{typename, v}
return json.Marshal(result)
case *queryWithInterfaceListFieldBeingsAnimal: case *queryWithInterfaceListFieldBeingsAnimal:
typename = "Animal" typename = "Animal"
@@ -2142,6 +2134,14 @@ func __marshalqueryWithInterfaceListFieldBeingsBeing(v *queryWithInterfaceListFi
*queryWithInterfaceListFieldBeingsAnimal *queryWithInterfaceListFieldBeingsAnimal
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *queryWithInterfaceListFieldBeingsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithInterfaceListFieldBeingsUser
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -2270,8 +2270,8 @@ func (v *queryWithInterfaceListPointerFieldBeingsAnimal) GetName() string { retu
// queryWithInterfaceListPointerFieldBeingsBeing includes the requested fields of the GraphQL interface Being. // queryWithInterfaceListPointerFieldBeingsBeing includes the requested fields of the GraphQL interface Being.
// //
// queryWithInterfaceListPointerFieldBeingsBeing is implemented by the following types: // queryWithInterfaceListPointerFieldBeingsBeing is implemented by the following types:
// queryWithInterfaceListPointerFieldBeingsUser
// queryWithInterfaceListPointerFieldBeingsAnimal // queryWithInterfaceListPointerFieldBeingsAnimal
// queryWithInterfaceListPointerFieldBeingsUser
type queryWithInterfaceListPointerFieldBeingsBeing interface { type queryWithInterfaceListPointerFieldBeingsBeing interface {
implementsGraphQLInterfacequeryWithInterfaceListPointerFieldBeingsBeing() implementsGraphQLInterfacequeryWithInterfaceListPointerFieldBeingsBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -2282,10 +2282,10 @@ type queryWithInterfaceListPointerFieldBeingsBeing interface {
GetName() string GetName() string
} }
func (v *queryWithInterfaceListPointerFieldBeingsUser) implementsGraphQLInterfacequeryWithInterfaceListPointerFieldBeingsBeing() {
}
func (v *queryWithInterfaceListPointerFieldBeingsAnimal) implementsGraphQLInterfacequeryWithInterfaceListPointerFieldBeingsBeing() { func (v *queryWithInterfaceListPointerFieldBeingsAnimal) implementsGraphQLInterfacequeryWithInterfaceListPointerFieldBeingsBeing() {
} }
func (v *queryWithInterfaceListPointerFieldBeingsUser) implementsGraphQLInterfacequeryWithInterfaceListPointerFieldBeingsBeing() {
}
func __unmarshalqueryWithInterfaceListPointerFieldBeingsBeing(b []byte, v *queryWithInterfaceListPointerFieldBeingsBeing) error { func __unmarshalqueryWithInterfaceListPointerFieldBeingsBeing(b []byte, v *queryWithInterfaceListPointerFieldBeingsBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -2301,12 +2301,12 @@ func __unmarshalqueryWithInterfaceListPointerFieldBeingsBeing(b []byte, v *query
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(queryWithInterfaceListPointerFieldBeingsUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(queryWithInterfaceListPointerFieldBeingsAnimal) *v = new(queryWithInterfaceListPointerFieldBeingsAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(queryWithInterfaceListPointerFieldBeingsUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -2320,14 +2320,6 @@ func __marshalqueryWithInterfaceListPointerFieldBeingsBeing(v *queryWithInterfac
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *queryWithInterfaceListPointerFieldBeingsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithInterfaceListPointerFieldBeingsUser
}{typename, v}
return json.Marshal(result)
case *queryWithInterfaceListPointerFieldBeingsAnimal: case *queryWithInterfaceListPointerFieldBeingsAnimal:
typename = "Animal" typename = "Animal"
@@ -2336,6 +2328,14 @@ func __marshalqueryWithInterfaceListPointerFieldBeingsBeing(v *queryWithInterfac
*queryWithInterfaceListPointerFieldBeingsAnimal *queryWithInterfaceListPointerFieldBeingsAnimal
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *queryWithInterfaceListPointerFieldBeingsUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithInterfaceListPointerFieldBeingsUser
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -2451,8 +2451,8 @@ func (v *queryWithInterfaceListPointerFieldResponse) __premarshalJSON() (*__prem
// queryWithInterfaceNoFragmentsBeing includes the requested fields of the GraphQL interface Being. // queryWithInterfaceNoFragmentsBeing includes the requested fields of the GraphQL interface Being.
// //
// queryWithInterfaceNoFragmentsBeing is implemented by the following types: // queryWithInterfaceNoFragmentsBeing is implemented by the following types:
// queryWithInterfaceNoFragmentsBeingUser
// queryWithInterfaceNoFragmentsBeingAnimal // queryWithInterfaceNoFragmentsBeingAnimal
// queryWithInterfaceNoFragmentsBeingUser
type queryWithInterfaceNoFragmentsBeing interface { type queryWithInterfaceNoFragmentsBeing interface {
implementsGraphQLInterfacequeryWithInterfaceNoFragmentsBeing() implementsGraphQLInterfacequeryWithInterfaceNoFragmentsBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -2463,10 +2463,10 @@ type queryWithInterfaceNoFragmentsBeing interface {
GetName() string GetName() string
} }
func (v *queryWithInterfaceNoFragmentsBeingUser) implementsGraphQLInterfacequeryWithInterfaceNoFragmentsBeing() {
}
func (v *queryWithInterfaceNoFragmentsBeingAnimal) implementsGraphQLInterfacequeryWithInterfaceNoFragmentsBeing() { func (v *queryWithInterfaceNoFragmentsBeingAnimal) implementsGraphQLInterfacequeryWithInterfaceNoFragmentsBeing() {
} }
func (v *queryWithInterfaceNoFragmentsBeingUser) implementsGraphQLInterfacequeryWithInterfaceNoFragmentsBeing() {
}
func __unmarshalqueryWithInterfaceNoFragmentsBeing(b []byte, v *queryWithInterfaceNoFragmentsBeing) error { func __unmarshalqueryWithInterfaceNoFragmentsBeing(b []byte, v *queryWithInterfaceNoFragmentsBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -2482,12 +2482,12 @@ func __unmarshalqueryWithInterfaceNoFragmentsBeing(b []byte, v *queryWithInterfa
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(queryWithInterfaceNoFragmentsBeingUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(queryWithInterfaceNoFragmentsBeingAnimal) *v = new(queryWithInterfaceNoFragmentsBeingAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(queryWithInterfaceNoFragmentsBeingUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -2501,14 +2501,6 @@ func __marshalqueryWithInterfaceNoFragmentsBeing(v *queryWithInterfaceNoFragment
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *queryWithInterfaceNoFragmentsBeingUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithInterfaceNoFragmentsBeingUser
}{typename, v}
return json.Marshal(result)
case *queryWithInterfaceNoFragmentsBeingAnimal: case *queryWithInterfaceNoFragmentsBeingAnimal:
typename = "Animal" typename = "Animal"
@@ -2517,6 +2509,14 @@ func __marshalqueryWithInterfaceNoFragmentsBeing(v *queryWithInterfaceNoFragment
*queryWithInterfaceNoFragmentsBeingAnimal *queryWithInterfaceNoFragmentsBeingAnimal
}{typename, v} }{typename, v}
return json.Marshal(result) return json.Marshal(result)
case *queryWithInterfaceNoFragmentsBeingUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*queryWithInterfaceNoFragmentsBeingUser
}{typename, v}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default:
@@ -2741,8 +2741,8 @@ func (v *queryWithNamedFragmentsBeingsAnimal) __premarshalJSON() (*__premarshalq
// queryWithNamedFragmentsBeingsBeing includes the requested fields of the GraphQL interface Being. // queryWithNamedFragmentsBeingsBeing includes the requested fields of the GraphQL interface Being.
// //
// queryWithNamedFragmentsBeingsBeing is implemented by the following types: // queryWithNamedFragmentsBeingsBeing is implemented by the following types:
// queryWithNamedFragmentsBeingsUser
// queryWithNamedFragmentsBeingsAnimal // queryWithNamedFragmentsBeingsAnimal
// queryWithNamedFragmentsBeingsUser
type queryWithNamedFragmentsBeingsBeing interface { type queryWithNamedFragmentsBeingsBeing interface {
implementsGraphQLInterfacequeryWithNamedFragmentsBeingsBeing() implementsGraphQLInterfacequeryWithNamedFragmentsBeingsBeing()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
@@ -2751,10 +2751,10 @@ type queryWithNamedFragmentsBeingsBeing interface {
GetId() string GetId() string
} }
func (v *queryWithNamedFragmentsBeingsUser) implementsGraphQLInterfacequeryWithNamedFragmentsBeingsBeing() {
}
func (v *queryWithNamedFragmentsBeingsAnimal) implementsGraphQLInterfacequeryWithNamedFragmentsBeingsBeing() { func (v *queryWithNamedFragmentsBeingsAnimal) implementsGraphQLInterfacequeryWithNamedFragmentsBeingsBeing() {
} }
func (v *queryWithNamedFragmentsBeingsUser) implementsGraphQLInterfacequeryWithNamedFragmentsBeingsBeing() {
}
func __unmarshalqueryWithNamedFragmentsBeingsBeing(b []byte, v *queryWithNamedFragmentsBeingsBeing) error { func __unmarshalqueryWithNamedFragmentsBeingsBeing(b []byte, v *queryWithNamedFragmentsBeingsBeing) error {
if string(b) == "null" { if string(b) == "null" {
@@ -2770,12 +2770,12 @@ func __unmarshalqueryWithNamedFragmentsBeingsBeing(b []byte, v *queryWithNamedFr
} }
switch tn.TypeName { switch tn.TypeName {
case "User":
*v = new(queryWithNamedFragmentsBeingsUser)
return json.Unmarshal(b, *v)
case "Animal": case "Animal":
*v = new(queryWithNamedFragmentsBeingsAnimal) *v = new(queryWithNamedFragmentsBeingsAnimal)
return json.Unmarshal(b, *v) return json.Unmarshal(b, *v)
case "User":
*v = new(queryWithNamedFragmentsBeingsUser)
return json.Unmarshal(b, *v)
case "": case "":
return fmt.Errorf( return fmt.Errorf(
"response was missing Being.__typename") "response was missing Being.__typename")
@@ -2789,18 +2789,6 @@ func __marshalqueryWithNamedFragmentsBeingsBeing(v *queryWithNamedFragmentsBeing
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *queryWithNamedFragmentsBeingsUser:
typename = "User"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalqueryWithNamedFragmentsBeingsUser
}{typename, premarshaled}
return json.Marshal(result)
case *queryWithNamedFragmentsBeingsAnimal: case *queryWithNamedFragmentsBeingsAnimal:
typename = "Animal" typename = "Animal"
@@ -2813,6 +2801,18 @@ func __marshalqueryWithNamedFragmentsBeingsBeing(v *queryWithNamedFragmentsBeing
*__premarshalqueryWithNamedFragmentsBeingsAnimal *__premarshalqueryWithNamedFragmentsBeingsAnimal
}{typename, premarshaled} }{typename, premarshaled}
return json.Marshal(result) return json.Marshal(result)
case *queryWithNamedFragmentsBeingsUser:
typename = "User"
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
result := struct {
TypeName string `json:"__typename"`
*__premarshalqueryWithNamedFragmentsBeingsUser
}{typename, premarshaled}
return json.Marshal(result)
case nil: case nil:
return []byte("null"), nil return []byte("null"), nil
default: default: