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:
+84
-84
@@ -44,8 +44,8 @@ func (v *ComplexInlineFragmentsConflictingStuffArticleThumbnailStuffThumbnail) G
|
||||
//
|
||||
// ComplexInlineFragmentsConflictingStuffContent is implemented by the following types:
|
||||
// ComplexInlineFragmentsConflictingStuffArticle
|
||||
// ComplexInlineFragmentsConflictingStuffVideo
|
||||
// ComplexInlineFragmentsConflictingStuffTopic
|
||||
// ComplexInlineFragmentsConflictingStuffVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -57,10 +57,10 @@ type ComplexInlineFragmentsConflictingStuffContent interface {
|
||||
|
||||
func (v *ComplexInlineFragmentsConflictingStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsConflictingStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsConflictingStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsConflictingStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsConflictingStuffContent() {
|
||||
}
|
||||
|
||||
func __unmarshalComplexInlineFragmentsConflictingStuffContent(b []byte, v *ComplexInlineFragmentsConflictingStuffContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -79,12 +79,12 @@ func __unmarshalComplexInlineFragmentsConflictingStuffContent(b []byte, v *Compl
|
||||
case "Article":
|
||||
*v = new(ComplexInlineFragmentsConflictingStuffArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsConflictingStuffVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ComplexInlineFragmentsConflictingStuffTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsConflictingStuffVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -106,14 +106,6 @@ func __marshalComplexInlineFragmentsConflictingStuffContent(v *ComplexInlineFrag
|
||||
*ComplexInlineFragmentsConflictingStuffArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsConflictingStuffVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsConflictingStuffVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsConflictingStuffTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -122,6 +114,14 @@ func __marshalComplexInlineFragmentsConflictingStuffContent(v *ComplexInlineFrag
|
||||
*ComplexInlineFragmentsConflictingStuffTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsConflictingStuffVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsConflictingStuffVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -178,8 +178,8 @@ func (v *ComplexInlineFragmentsNestedStuffArticle) GetTypename() string { return
|
||||
//
|
||||
// ComplexInlineFragmentsNestedStuffContent is implemented by the following types:
|
||||
// ComplexInlineFragmentsNestedStuffArticle
|
||||
// ComplexInlineFragmentsNestedStuffVideo
|
||||
// ComplexInlineFragmentsNestedStuffTopic
|
||||
// ComplexInlineFragmentsNestedStuffVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -191,10 +191,10 @@ type ComplexInlineFragmentsNestedStuffContent interface {
|
||||
|
||||
func (v *ComplexInlineFragmentsNestedStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffContent() {
|
||||
}
|
||||
|
||||
func __unmarshalComplexInlineFragmentsNestedStuffContent(b []byte, v *ComplexInlineFragmentsNestedStuffContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -213,12 +213,12 @@ func __unmarshalComplexInlineFragmentsNestedStuffContent(b []byte, v *ComplexInl
|
||||
case "Article":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -240,14 +240,6 @@ func __marshalComplexInlineFragmentsNestedStuffContent(v *ComplexInlineFragments
|
||||
*ComplexInlineFragmentsNestedStuffArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsNestedStuffVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -260,6 +252,14 @@ func __marshalComplexInlineFragmentsNestedStuffContent(v *ComplexInlineFragments
|
||||
*__premarshalComplexInlineFragmentsNestedStuffTopic
|
||||
}{typename, premarshaled}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsNestedStuffVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -497,8 +497,8 @@ func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParen
|
||||
//
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent is implemented by the following types:
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -517,10 +517,10 @@ type ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTop
|
||||
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent(b []byte, v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -539,12 +539,12 @@ func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentConte
|
||||
case "Article":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -566,14 +566,6 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContent
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -582,6 +574,14 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContent
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentContentParentTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -656,8 +656,8 @@ func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticleParentTopic) GetPa
|
||||
//
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenContent is implemented by the following types:
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenArticle
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenVideo
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenTopic
|
||||
// ComplexInlineFragmentsNestedStuffTopicChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -674,10 +674,10 @@ type ComplexInlineFragmentsNestedStuffTopicChildrenContent interface {
|
||||
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenArticle) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenTopic) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsNestedStuffTopicChildrenVideo) implementsGraphQLInterfaceComplexInlineFragmentsNestedStuffTopicChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenContent(b []byte, v *ComplexInlineFragmentsNestedStuffTopicChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -696,12 +696,12 @@ func __unmarshalComplexInlineFragmentsNestedStuffTopicChildrenContent(b []byte,
|
||||
case "Article":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsNestedStuffTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -723,14 +723,6 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenContent(v *ComplexIn
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -739,6 +731,14 @@ func __marshalComplexInlineFragmentsNestedStuffTopicChildrenContent(v *ComplexIn
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsNestedStuffTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsNestedStuffTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -806,8 +806,8 @@ func (v *ComplexInlineFragmentsRandomItemArticle) GetName() string { return v.Na
|
||||
//
|
||||
// ComplexInlineFragmentsRandomItemContent is implemented by the following types:
|
||||
// ComplexInlineFragmentsRandomItemArticle
|
||||
// ComplexInlineFragmentsRandomItemVideo
|
||||
// ComplexInlineFragmentsRandomItemTopic
|
||||
// ComplexInlineFragmentsRandomItemVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -826,10 +826,10 @@ type ComplexInlineFragmentsRandomItemContent interface {
|
||||
|
||||
func (v *ComplexInlineFragmentsRandomItemArticle) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsRandomItemVideo) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsRandomItemTopic) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsRandomItemVideo) implementsGraphQLInterfaceComplexInlineFragmentsRandomItemContent() {
|
||||
}
|
||||
|
||||
func __unmarshalComplexInlineFragmentsRandomItemContent(b []byte, v *ComplexInlineFragmentsRandomItemContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -848,12 +848,12 @@ func __unmarshalComplexInlineFragmentsRandomItemContent(b []byte, v *ComplexInli
|
||||
case "Article":
|
||||
*v = new(ComplexInlineFragmentsRandomItemArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ComplexInlineFragmentsRandomItemTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -875,14 +875,6 @@ func __marshalComplexInlineFragmentsRandomItemContent(v *ComplexInlineFragmentsR
|
||||
*ComplexInlineFragmentsRandomItemArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsRandomItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsRandomItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsRandomItemTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -891,6 +883,14 @@ func __marshalComplexInlineFragmentsRandomItemContent(v *ComplexInlineFragmentsR
|
||||
*ComplexInlineFragmentsRandomItemTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsRandomItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsRandomItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -975,8 +975,8 @@ func (v *ComplexInlineFragmentsRepeatedStuffArticle) GetOtherName() string { ret
|
||||
//
|
||||
// ComplexInlineFragmentsRepeatedStuffContent is implemented by the following types:
|
||||
// ComplexInlineFragmentsRepeatedStuffArticle
|
||||
// ComplexInlineFragmentsRepeatedStuffVideo
|
||||
// ComplexInlineFragmentsRepeatedStuffTopic
|
||||
// ComplexInlineFragmentsRepeatedStuffVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -1004,10 +1004,10 @@ type ComplexInlineFragmentsRepeatedStuffContent interface {
|
||||
|
||||
func (v *ComplexInlineFragmentsRepeatedStuffArticle) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsRepeatedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsRepeatedStuffTopic) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
|
||||
}
|
||||
func (v *ComplexInlineFragmentsRepeatedStuffVideo) implementsGraphQLInterfaceComplexInlineFragmentsRepeatedStuffContent() {
|
||||
}
|
||||
|
||||
func __unmarshalComplexInlineFragmentsRepeatedStuffContent(b []byte, v *ComplexInlineFragmentsRepeatedStuffContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -1026,12 +1026,12 @@ func __unmarshalComplexInlineFragmentsRepeatedStuffContent(b []byte, v *ComplexI
|
||||
case "Article":
|
||||
*v = new(ComplexInlineFragmentsRepeatedStuffArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsRepeatedStuffVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ComplexInlineFragmentsRepeatedStuffTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ComplexInlineFragmentsRepeatedStuffVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -1053,14 +1053,6 @@ func __marshalComplexInlineFragmentsRepeatedStuffContent(v *ComplexInlineFragmen
|
||||
*ComplexInlineFragmentsRepeatedStuffArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsRepeatedStuffVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsRepeatedStuffVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsRepeatedStuffTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -1069,6 +1061,14 @@ func __marshalComplexInlineFragmentsRepeatedStuffContent(v *ComplexInlineFragmen
|
||||
*ComplexInlineFragmentsRepeatedStuffTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ComplexInlineFragmentsRepeatedStuffVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ComplexInlineFragmentsRepeatedStuffVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
+32
-32
@@ -701,8 +701,8 @@ func (v *InnerQueryFragmentRandomItemArticle) __premarshalJSON() (*__premarshalI
|
||||
//
|
||||
// InnerQueryFragmentRandomItemContent is implemented by the following types:
|
||||
// InnerQueryFragmentRandomItemArticle
|
||||
// InnerQueryFragmentRandomItemVideo
|
||||
// InnerQueryFragmentRandomItemTopic
|
||||
// InnerQueryFragmentRandomItemVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -722,10 +722,10 @@ type InnerQueryFragmentRandomItemContent interface {
|
||||
|
||||
func (v *InnerQueryFragmentRandomItemArticle) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *InnerQueryFragmentRandomItemVideo) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *InnerQueryFragmentRandomItemTopic) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *InnerQueryFragmentRandomItemVideo) implementsGraphQLInterfaceInnerQueryFragmentRandomItemContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInnerQueryFragmentRandomItemContent(b []byte, v *InnerQueryFragmentRandomItemContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -744,12 +744,12 @@ func __unmarshalInnerQueryFragmentRandomItemContent(b []byte, v *InnerQueryFragm
|
||||
case "Article":
|
||||
*v = new(InnerQueryFragmentRandomItemArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InnerQueryFragmentRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InnerQueryFragmentRandomItemTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InnerQueryFragmentRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -775,18 +775,6 @@ func __marshalInnerQueryFragmentRandomItemContent(v *InnerQueryFragmentRandomIte
|
||||
*__premarshalInnerQueryFragmentRandomItemArticle
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -799,6 +787,18 @@ func __marshalInnerQueryFragmentRandomItemContent(v *InnerQueryFragmentRandomIte
|
||||
*__premarshalInnerQueryFragmentRandomItemTopic
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -1360,8 +1360,8 @@ func (v *MoreVideoFieldsParentTopicChildrenArticle) GetTypename() *string { retu
|
||||
//
|
||||
// MoreVideoFieldsParentTopicChildrenContent is implemented by the following types:
|
||||
// MoreVideoFieldsParentTopicChildrenArticle
|
||||
// MoreVideoFieldsParentTopicChildrenVideo
|
||||
// MoreVideoFieldsParentTopicChildrenTopic
|
||||
// MoreVideoFieldsParentTopicChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -1373,10 +1373,10 @@ type MoreVideoFieldsParentTopicChildrenContent interface {
|
||||
|
||||
func (v *MoreVideoFieldsParentTopicChildrenArticle) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *MoreVideoFieldsParentTopicChildrenVideo) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *MoreVideoFieldsParentTopicChildrenTopic) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *MoreVideoFieldsParentTopicChildrenVideo) implementsGraphQLInterfaceMoreVideoFieldsParentTopicChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalMoreVideoFieldsParentTopicChildrenContent(b []byte, v *MoreVideoFieldsParentTopicChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -1395,12 +1395,12 @@ func __unmarshalMoreVideoFieldsParentTopicChildrenContent(b []byte, v *MoreVideo
|
||||
case "Article":
|
||||
*v = new(MoreVideoFieldsParentTopicChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(MoreVideoFieldsParentTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(MoreVideoFieldsParentTopicChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(MoreVideoFieldsParentTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -1422,6 +1422,14 @@ func __marshalMoreVideoFieldsParentTopicChildrenContent(v *MoreVideoFieldsParent
|
||||
*MoreVideoFieldsParentTopicChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *MoreVideoFieldsParentTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*MoreVideoFieldsParentTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *MoreVideoFieldsParentTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
@@ -1434,14 +1442,6 @@ func __marshalMoreVideoFieldsParentTopicChildrenContent(v *MoreVideoFieldsParent
|
||||
*__premarshalMoreVideoFieldsParentTopicChildrenVideo
|
||||
}{typename, premarshaled}
|
||||
return json.Marshal(result)
|
||||
case *MoreVideoFieldsParentTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*MoreVideoFieldsParentTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
+97
-97
@@ -17,8 +17,8 @@ import (
|
||||
//
|
||||
// ContentFields is implemented by the following types:
|
||||
// ContentFieldsArticle
|
||||
// ContentFieldsVideo
|
||||
// ContentFieldsTopic
|
||||
// ContentFieldsVideo
|
||||
type ContentFields interface {
|
||||
implementsGraphQLInterfaceContentFields()
|
||||
// GetNext returns the interface-field "next" from its implementation.
|
||||
@@ -28,8 +28,8 @@ type ContentFields interface {
|
||||
}
|
||||
|
||||
func (v *ContentFieldsArticle) implementsGraphQLInterfaceContentFields() {}
|
||||
func (v *ContentFieldsVideo) implementsGraphQLInterfaceContentFields() {}
|
||||
func (v *ContentFieldsTopic) implementsGraphQLInterfaceContentFields() {}
|
||||
func (v *ContentFieldsVideo) implementsGraphQLInterfaceContentFields() {}
|
||||
|
||||
func __unmarshalContentFields(b []byte, v *ContentFields) error {
|
||||
if string(b) == "null" {
|
||||
@@ -48,12 +48,12 @@ func __unmarshalContentFields(b []byte, v *ContentFields) error {
|
||||
case "Article":
|
||||
*v = new(ContentFieldsArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ContentFieldsVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ContentFieldsTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ContentFieldsVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -79,18 +79,6 @@ func __marshalContentFields(v *ContentFields) ([]byte, error) {
|
||||
*__premarshalContentFieldsArticle
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -103,6 +91,18 @@ func __marshalContentFields(v *ContentFields) ([]byte, error) {
|
||||
*__premarshalContentFieldsTopic
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -246,8 +246,8 @@ func (v *ContentFieldsNextArticle) GetId() testutil.ID { return v.Id }
|
||||
//
|
||||
// ContentFieldsNextContent is implemented by the following types:
|
||||
// ContentFieldsNextArticle
|
||||
// ContentFieldsNextVideo
|
||||
// ContentFieldsNextTopic
|
||||
// ContentFieldsNextVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -263,8 +263,8 @@ type ContentFieldsNextContent interface {
|
||||
}
|
||||
|
||||
func (v *ContentFieldsNextArticle) implementsGraphQLInterfaceContentFieldsNextContent() {}
|
||||
func (v *ContentFieldsNextVideo) implementsGraphQLInterfaceContentFieldsNextContent() {}
|
||||
func (v *ContentFieldsNextTopic) implementsGraphQLInterfaceContentFieldsNextContent() {}
|
||||
func (v *ContentFieldsNextVideo) implementsGraphQLInterfaceContentFieldsNextContent() {}
|
||||
|
||||
func __unmarshalContentFieldsNextContent(b []byte, v *ContentFieldsNextContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -283,12 +283,12 @@ func __unmarshalContentFieldsNextContent(b []byte, v *ContentFieldsNextContent)
|
||||
case "Article":
|
||||
*v = new(ContentFieldsNextArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ContentFieldsNextVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ContentFieldsNextTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ContentFieldsNextVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -310,14 +310,6 @@ func __marshalContentFieldsNextContent(v *ContentFieldsNextContent) ([]byte, err
|
||||
*ContentFieldsNextArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ContentFieldsNextVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ContentFieldsNextVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ContentFieldsNextTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -326,6 +318,14 @@ func __marshalContentFieldsNextContent(v *ContentFieldsNextContent) ([]byte, err
|
||||
*ContentFieldsNextTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ContentFieldsNextVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ContentFieldsNextVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -377,8 +377,8 @@ func (v *ContentFieldsRelatedArticle) GetId() testutil.ID { return v.Id }
|
||||
//
|
||||
// ContentFieldsRelatedContent is implemented by the following types:
|
||||
// ContentFieldsRelatedArticle
|
||||
// ContentFieldsRelatedVideo
|
||||
// ContentFieldsRelatedTopic
|
||||
// ContentFieldsRelatedVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -394,8 +394,8 @@ type ContentFieldsRelatedContent interface {
|
||||
}
|
||||
|
||||
func (v *ContentFieldsRelatedArticle) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
|
||||
func (v *ContentFieldsRelatedVideo) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
|
||||
func (v *ContentFieldsRelatedTopic) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
|
||||
func (v *ContentFieldsRelatedVideo) implementsGraphQLInterfaceContentFieldsRelatedContent() {}
|
||||
|
||||
func __unmarshalContentFieldsRelatedContent(b []byte, v *ContentFieldsRelatedContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -414,12 +414,12 @@ func __unmarshalContentFieldsRelatedContent(b []byte, v *ContentFieldsRelatedCon
|
||||
case "Article":
|
||||
*v = new(ContentFieldsRelatedArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ContentFieldsRelatedVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ContentFieldsRelatedTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ContentFieldsRelatedVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -441,14 +441,6 @@ func __marshalContentFieldsRelatedContent(v *ContentFieldsRelatedContent) ([]byt
|
||||
*ContentFieldsRelatedArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ContentFieldsRelatedVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ContentFieldsRelatedVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ContentFieldsRelatedTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -457,6 +449,14 @@ func __marshalContentFieldsRelatedContent(v *ContentFieldsRelatedContent) ([]byt
|
||||
*ContentFieldsRelatedTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ContentFieldsRelatedVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ContentFieldsRelatedVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -865,8 +865,8 @@ func (v *CovariantInterfaceImplementationRandomItemArticle) __premarshalJSON() (
|
||||
//
|
||||
// CovariantInterfaceImplementationRandomItemContent is implemented by the following types:
|
||||
// CovariantInterfaceImplementationRandomItemArticle
|
||||
// CovariantInterfaceImplementationRandomItemVideo
|
||||
// CovariantInterfaceImplementationRandomItemTopic
|
||||
// CovariantInterfaceImplementationRandomItemVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -887,10 +887,10 @@ type CovariantInterfaceImplementationRandomItemContent interface {
|
||||
|
||||
func (v *CovariantInterfaceImplementationRandomItemArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContent() {
|
||||
}
|
||||
|
||||
func __unmarshalCovariantInterfaceImplementationRandomItemContent(b []byte, v *CovariantInterfaceImplementationRandomItemContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -909,12 +909,12 @@ func __unmarshalCovariantInterfaceImplementationRandomItemContent(b []byte, v *C
|
||||
case "Article":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -940,18 +940,6 @@ func __marshalCovariantInterfaceImplementationRandomItemContent(v *CovariantInte
|
||||
*__premarshalCovariantInterfaceImplementationRandomItemArticle
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -964,6 +952,18 @@ func __marshalCovariantInterfaceImplementationRandomItemContent(v *CovariantInte
|
||||
*__premarshalCovariantInterfaceImplementationRandomItemTopic
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -1075,8 +1075,8 @@ func (v *CovariantInterfaceImplementationRandomItemContentNextArticle) __premars
|
||||
//
|
||||
// CovariantInterfaceImplementationRandomItemContentNextContent is implemented by the following types:
|
||||
// CovariantInterfaceImplementationRandomItemContentNextArticle
|
||||
// CovariantInterfaceImplementationRandomItemContentNextVideo
|
||||
// CovariantInterfaceImplementationRandomItemContentNextTopic
|
||||
// CovariantInterfaceImplementationRandomItemContentNextVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -1089,10 +1089,10 @@ type CovariantInterfaceImplementationRandomItemContentNextContent interface {
|
||||
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentNextArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentNextVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentNextTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentNextVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentNextContent() {
|
||||
}
|
||||
|
||||
func __unmarshalCovariantInterfaceImplementationRandomItemContentNextContent(b []byte, v *CovariantInterfaceImplementationRandomItemContentNextContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -1111,12 +1111,12 @@ func __unmarshalCovariantInterfaceImplementationRandomItemContentNextContent(b [
|
||||
case "Article":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentNextArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentNextVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentNextTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentNextVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -1142,18 +1142,6 @@ func __marshalCovariantInterfaceImplementationRandomItemContentNextContent(v *Co
|
||||
*__premarshalCovariantInterfaceImplementationRandomItemContentNextArticle
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -1166,6 +1154,18 @@ func __marshalCovariantInterfaceImplementationRandomItemContentNextContent(v *Co
|
||||
*__premarshalCovariantInterfaceImplementationRandomItemContentNextTopic
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -1475,8 +1475,8 @@ func (v *CovariantInterfaceImplementationRandomItemContentRelatedArticle) __prem
|
||||
//
|
||||
// CovariantInterfaceImplementationRandomItemContentRelatedContent is implemented by the following types:
|
||||
// CovariantInterfaceImplementationRandomItemContentRelatedArticle
|
||||
// CovariantInterfaceImplementationRandomItemContentRelatedVideo
|
||||
// CovariantInterfaceImplementationRandomItemContentRelatedTopic
|
||||
// CovariantInterfaceImplementationRandomItemContentRelatedVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -1489,10 +1489,10 @@ type CovariantInterfaceImplementationRandomItemContentRelatedContent interface {
|
||||
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentRelatedArticle) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentRelatedVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentRelatedTopic) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
|
||||
}
|
||||
func (v *CovariantInterfaceImplementationRandomItemContentRelatedVideo) implementsGraphQLInterfaceCovariantInterfaceImplementationRandomItemContentRelatedContent() {
|
||||
}
|
||||
|
||||
func __unmarshalCovariantInterfaceImplementationRandomItemContentRelatedContent(b []byte, v *CovariantInterfaceImplementationRandomItemContentRelatedContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -1511,12 +1511,12 @@ func __unmarshalCovariantInterfaceImplementationRandomItemContentRelatedContent(
|
||||
case "Article":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(CovariantInterfaceImplementationRandomItemContentRelatedVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -1542,18 +1542,6 @@ func __marshalCovariantInterfaceImplementationRandomItemContentRelatedContent(v
|
||||
*__premarshalCovariantInterfaceImplementationRandomItemContentRelatedArticle
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -1566,6 +1554,18 @@ func __marshalCovariantInterfaceImplementationRandomItemContentRelatedContent(v
|
||||
*__premarshalCovariantInterfaceImplementationRandomItemContentRelatedTopic
|
||||
}{typename, premarshaled}
|
||||
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:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
Vendored
+28
-28
@@ -145,8 +145,8 @@ func (v *InterfaceListFieldRootTopicChildrenArticle) GetName() string { return v
|
||||
//
|
||||
// InterfaceListFieldRootTopicChildrenContent is implemented by the following types:
|
||||
// InterfaceListFieldRootTopicChildrenArticle
|
||||
// InterfaceListFieldRootTopicChildrenVideo
|
||||
// InterfaceListFieldRootTopicChildrenTopic
|
||||
// InterfaceListFieldRootTopicChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -165,10 +165,10 @@ type InterfaceListFieldRootTopicChildrenContent interface {
|
||||
|
||||
func (v *InterfaceListFieldRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceListFieldRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceListFieldRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceListFieldRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldRootTopicChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceListFieldRootTopicChildrenContent(b []byte, v *InterfaceListFieldRootTopicChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -187,12 +187,12 @@ func __unmarshalInterfaceListFieldRootTopicChildrenContent(b []byte, v *Interfac
|
||||
case "Article":
|
||||
*v = new(InterfaceListFieldRootTopicChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListFieldRootTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceListFieldRootTopicChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListFieldRootTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -214,14 +214,6 @@ func __marshalInterfaceListFieldRootTopicChildrenContent(v *InterfaceListFieldRo
|
||||
*InterfaceListFieldRootTopicChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListFieldRootTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListFieldRootTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListFieldRootTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -230,6 +222,14 @@ func __marshalInterfaceListFieldRootTopicChildrenContent(v *InterfaceListFieldRo
|
||||
*InterfaceListFieldRootTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListFieldRootTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListFieldRootTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -393,8 +393,8 @@ func (v *InterfaceListFieldWithPointerTopicChildrenArticle) GetName() string { r
|
||||
//
|
||||
// InterfaceListFieldWithPointerTopicChildrenContent is implemented by the following types:
|
||||
// InterfaceListFieldWithPointerTopicChildrenArticle
|
||||
// InterfaceListFieldWithPointerTopicChildrenVideo
|
||||
// InterfaceListFieldWithPointerTopicChildrenTopic
|
||||
// InterfaceListFieldWithPointerTopicChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -413,10 +413,10 @@ type InterfaceListFieldWithPointerTopicChildrenContent interface {
|
||||
|
||||
func (v *InterfaceListFieldWithPointerTopicChildrenArticle) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceListFieldWithPointerTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceListFieldWithPointerTopicChildrenTopic) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceListFieldWithPointerTopicChildrenVideo) implementsGraphQLInterfaceInterfaceListFieldWithPointerTopicChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceListFieldWithPointerTopicChildrenContent(b []byte, v *InterfaceListFieldWithPointerTopicChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -435,12 +435,12 @@ func __unmarshalInterfaceListFieldWithPointerTopicChildrenContent(b []byte, v *I
|
||||
case "Article":
|
||||
*v = new(InterfaceListFieldWithPointerTopicChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListFieldWithPointerTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceListFieldWithPointerTopicChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListFieldWithPointerTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -462,14 +462,6 @@ func __marshalInterfaceListFieldWithPointerTopicChildrenContent(v *InterfaceList
|
||||
*InterfaceListFieldWithPointerTopicChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListFieldWithPointerTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListFieldWithPointerTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListFieldWithPointerTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -478,6 +470,14 @@ func __marshalInterfaceListFieldWithPointerTopicChildrenContent(v *InterfaceList
|
||||
*InterfaceListFieldWithPointerTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListFieldWithPointerTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListFieldWithPointerTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
+28
-28
@@ -14,8 +14,8 @@ import (
|
||||
//
|
||||
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContent is implemented by the following types:
|
||||
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle
|
||||
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
|
||||
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic
|
||||
// InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -34,10 +34,10 @@ type InterfaceListOfListOfListsFieldListOfListsOfListsOfContent interface {
|
||||
|
||||
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
|
||||
}
|
||||
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
|
||||
}
|
||||
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
|
||||
}
|
||||
func (v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldListOfListsOfListsOfContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(b []byte, v *InterfaceListOfListOfListsFieldListOfListsOfListsOfContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -56,12 +56,12 @@ func __unmarshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(b []b
|
||||
case "Article":
|
||||
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -83,14 +83,6 @@ func __marshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(v *Inte
|
||||
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -99,6 +91,14 @@ func __marshalInterfaceListOfListOfListsFieldListOfListsOfListsOfContent(v *Inte
|
||||
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListOfListOfListsFieldListOfListsOfListsOfContentVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -379,8 +379,8 @@ func (v *InterfaceListOfListOfListsFieldWithPointerArticle) GetName() *string {
|
||||
//
|
||||
// InterfaceListOfListOfListsFieldWithPointerContent is implemented by the following types:
|
||||
// InterfaceListOfListOfListsFieldWithPointerArticle
|
||||
// InterfaceListOfListOfListsFieldWithPointerVideo
|
||||
// InterfaceListOfListOfListsFieldWithPointerTopic
|
||||
// InterfaceListOfListOfListsFieldWithPointerVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -399,10 +399,10 @@ type InterfaceListOfListOfListsFieldWithPointerContent interface {
|
||||
|
||||
func (v *InterfaceListOfListOfListsFieldWithPointerArticle) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
|
||||
}
|
||||
func (v *InterfaceListOfListOfListsFieldWithPointerVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
|
||||
}
|
||||
func (v *InterfaceListOfListOfListsFieldWithPointerTopic) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
|
||||
}
|
||||
func (v *InterfaceListOfListOfListsFieldWithPointerVideo) implementsGraphQLInterfaceInterfaceListOfListOfListsFieldWithPointerContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceListOfListOfListsFieldWithPointerContent(b []byte, v *InterfaceListOfListOfListsFieldWithPointerContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -421,12 +421,12 @@ func __unmarshalInterfaceListOfListOfListsFieldWithPointerContent(b []byte, v *I
|
||||
case "Article":
|
||||
*v = new(InterfaceListOfListOfListsFieldWithPointerArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListOfListOfListsFieldWithPointerVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceListOfListOfListsFieldWithPointerTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceListOfListOfListsFieldWithPointerVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -448,14 +448,6 @@ func __marshalInterfaceListOfListOfListsFieldWithPointerContent(v *InterfaceList
|
||||
*InterfaceListOfListOfListsFieldWithPointerArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListOfListOfListsFieldWithPointerVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListOfListOfListsFieldWithPointerVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListOfListOfListsFieldWithPointerTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -464,6 +456,14 @@ func __marshalInterfaceListOfListOfListsFieldWithPointerContent(v *InterfaceList
|
||||
*InterfaceListOfListOfListsFieldWithPointerTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceListOfListOfListsFieldWithPointerVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceListOfListOfListsFieldWithPointerVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
Vendored
+28
-28
@@ -134,8 +134,8 @@ func (v *InterfaceNestingRootTopicChildrenArticle) GetParent() InterfaceNestingR
|
||||
//
|
||||
// InterfaceNestingRootTopicChildrenContent is implemented by the following types:
|
||||
// InterfaceNestingRootTopicChildrenArticle
|
||||
// InterfaceNestingRootTopicChildrenVideo
|
||||
// InterfaceNestingRootTopicChildrenTopic
|
||||
// InterfaceNestingRootTopicChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -154,10 +154,10 @@ type InterfaceNestingRootTopicChildrenContent interface {
|
||||
|
||||
func (v *InterfaceNestingRootTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceNestingRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceNestingRootTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceNestingRootTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceNestingRootTopicChildrenContent(b []byte, v *InterfaceNestingRootTopicChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -176,12 +176,12 @@ func __unmarshalInterfaceNestingRootTopicChildrenContent(b []byte, v *InterfaceN
|
||||
case "Article":
|
||||
*v = new(InterfaceNestingRootTopicChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNestingRootTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceNestingRootTopicChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNestingRootTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -203,14 +203,6 @@ func __marshalInterfaceNestingRootTopicChildrenContent(v *InterfaceNestingRootTo
|
||||
*InterfaceNestingRootTopicChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNestingRootTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNestingRootTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNestingRootTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -219,6 +211,14 @@ func __marshalInterfaceNestingRootTopicChildrenContent(v *InterfaceNestingRootTo
|
||||
*InterfaceNestingRootTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNestingRootTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNestingRootTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -341,8 +341,8 @@ func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle) Get
|
||||
//
|
||||
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent is implemented by the following types:
|
||||
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle
|
||||
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
|
||||
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic
|
||||
// InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -359,10 +359,10 @@ type InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent interfac
|
||||
|
||||
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
|
||||
}
|
||||
func (v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo) implementsGraphQLInterfaceInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent(b []byte, v *InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -381,12 +381,12 @@ func __unmarshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenConte
|
||||
case "Article":
|
||||
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -408,14 +408,6 @@ func __marshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent
|
||||
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -424,6 +416,14 @@ func __marshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent
|
||||
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNestingRootTopicChildrenContentParentTopicChildrenVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
+42
-42
@@ -31,8 +31,8 @@ func (v *InterfaceNoFragmentsQueryRandomItemArticle) GetName() string { return v
|
||||
//
|
||||
// InterfaceNoFragmentsQueryRandomItemContent is implemented by the following types:
|
||||
// InterfaceNoFragmentsQueryRandomItemArticle
|
||||
// InterfaceNoFragmentsQueryRandomItemVideo
|
||||
// InterfaceNoFragmentsQueryRandomItemTopic
|
||||
// InterfaceNoFragmentsQueryRandomItemVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -51,10 +51,10 @@ type InterfaceNoFragmentsQueryRandomItemContent interface {
|
||||
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceNoFragmentsQueryRandomItemContent(b []byte, v *InterfaceNoFragmentsQueryRandomItemContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -73,12 +73,12 @@ func __unmarshalInterfaceNoFragmentsQueryRandomItemContent(b []byte, v *Interfac
|
||||
case "Article":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -100,14 +100,6 @@ func __marshalInterfaceNoFragmentsQueryRandomItemContent(v *InterfaceNoFragments
|
||||
*InterfaceNoFragmentsQueryRandomItemArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryRandomItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNoFragmentsQueryRandomItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryRandomItemTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -116,6 +108,14 @@ func __marshalInterfaceNoFragmentsQueryRandomItemContent(v *InterfaceNoFragments
|
||||
*InterfaceNoFragmentsQueryRandomItemTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryRandomItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNoFragmentsQueryRandomItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -181,8 +181,8 @@ func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle) GetName() strin
|
||||
//
|
||||
// InterfaceNoFragmentsQueryRandomItemWithTypeNameContent is implemented by the following types:
|
||||
// InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle
|
||||
// InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
|
||||
// InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic
|
||||
// InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -201,10 +201,10 @@ type InterfaceNoFragmentsQueryRandomItemWithTypeNameContent interface {
|
||||
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryRandomItemWithTypeNameContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(b []byte, v *InterfaceNoFragmentsQueryRandomItemWithTypeNameContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -223,12 +223,12 @@ func __unmarshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(b []byte,
|
||||
case "Article":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -250,14 +250,6 @@ func __marshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(v *Interfac
|
||||
*InterfaceNoFragmentsQueryRandomItemWithTypeNameArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -266,6 +258,14 @@ func __marshalInterfaceNoFragmentsQueryRandomItemWithTypeNameContent(v *Interfac
|
||||
*InterfaceNoFragmentsQueryRandomItemWithTypeNameTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNoFragmentsQueryRandomItemWithTypeNameVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
@@ -499,8 +499,8 @@ func (v *InterfaceNoFragmentsQueryWithPointerArticle) GetName() *string { return
|
||||
//
|
||||
// InterfaceNoFragmentsQueryWithPointerContent is implemented by the following types:
|
||||
// InterfaceNoFragmentsQueryWithPointerArticle
|
||||
// InterfaceNoFragmentsQueryWithPointerVideo
|
||||
// InterfaceNoFragmentsQueryWithPointerTopic
|
||||
// InterfaceNoFragmentsQueryWithPointerVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -519,10 +519,10 @@ type InterfaceNoFragmentsQueryWithPointerContent interface {
|
||||
|
||||
func (v *InterfaceNoFragmentsQueryWithPointerArticle) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryWithPointerVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryWithPointerTopic) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
|
||||
}
|
||||
func (v *InterfaceNoFragmentsQueryWithPointerVideo) implementsGraphQLInterfaceInterfaceNoFragmentsQueryWithPointerContent() {
|
||||
}
|
||||
|
||||
func __unmarshalInterfaceNoFragmentsQueryWithPointerContent(b []byte, v *InterfaceNoFragmentsQueryWithPointerContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -541,12 +541,12 @@ func __unmarshalInterfaceNoFragmentsQueryWithPointerContent(b []byte, v *Interfa
|
||||
case "Article":
|
||||
*v = new(InterfaceNoFragmentsQueryWithPointerArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNoFragmentsQueryWithPointerVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(InterfaceNoFragmentsQueryWithPointerTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(InterfaceNoFragmentsQueryWithPointerVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -568,14 +568,6 @@ func __marshalInterfaceNoFragmentsQueryWithPointerContent(v *InterfaceNoFragment
|
||||
*InterfaceNoFragmentsQueryWithPointerArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryWithPointerVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNoFragmentsQueryWithPointerVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryWithPointerTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -584,6 +576,14 @@ func __marshalInterfaceNoFragmentsQueryWithPointerContent(v *InterfaceNoFragment
|
||||
*InterfaceNoFragmentsQueryWithPointerTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *InterfaceNoFragmentsQueryWithPointerVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*InterfaceNoFragmentsQueryWithPointerVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
+14
-14
@@ -35,8 +35,8 @@ func (v *SimpleInlineFragmentRandomItemArticle) GetText() string { return v.Text
|
||||
//
|
||||
// SimpleInlineFragmentRandomItemContent is implemented by the following types:
|
||||
// SimpleInlineFragmentRandomItemArticle
|
||||
// SimpleInlineFragmentRandomItemVideo
|
||||
// SimpleInlineFragmentRandomItemTopic
|
||||
// SimpleInlineFragmentRandomItemVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -55,10 +55,10 @@ type SimpleInlineFragmentRandomItemContent interface {
|
||||
|
||||
func (v *SimpleInlineFragmentRandomItemArticle) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *SimpleInlineFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *SimpleInlineFragmentRandomItemTopic) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *SimpleInlineFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleInlineFragmentRandomItemContent() {
|
||||
}
|
||||
|
||||
func __unmarshalSimpleInlineFragmentRandomItemContent(b []byte, v *SimpleInlineFragmentRandomItemContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -77,12 +77,12 @@ func __unmarshalSimpleInlineFragmentRandomItemContent(b []byte, v *SimpleInlineF
|
||||
case "Article":
|
||||
*v = new(SimpleInlineFragmentRandomItemArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(SimpleInlineFragmentRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(SimpleInlineFragmentRandomItemTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(SimpleInlineFragmentRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -104,14 +104,6 @@ func __marshalSimpleInlineFragmentRandomItemContent(v *SimpleInlineFragmentRando
|
||||
*SimpleInlineFragmentRandomItemArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *SimpleInlineFragmentRandomItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*SimpleInlineFragmentRandomItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *SimpleInlineFragmentRandomItemTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -120,6 +112,14 @@ func __marshalSimpleInlineFragmentRandomItemContent(v *SimpleInlineFragmentRando
|
||||
*SimpleInlineFragmentRandomItemTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *SimpleInlineFragmentRandomItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*SimpleInlineFragmentRandomItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
Vendored
+14
-14
@@ -31,8 +31,8 @@ func (v *SimpleNamedFragmentRandomItemArticle) GetName() string { return v.Name
|
||||
//
|
||||
// SimpleNamedFragmentRandomItemContent is implemented by the following types:
|
||||
// SimpleNamedFragmentRandomItemArticle
|
||||
// SimpleNamedFragmentRandomItemVideo
|
||||
// SimpleNamedFragmentRandomItemTopic
|
||||
// SimpleNamedFragmentRandomItemVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -51,10 +51,10 @@ type SimpleNamedFragmentRandomItemContent interface {
|
||||
|
||||
func (v *SimpleNamedFragmentRandomItemArticle) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *SimpleNamedFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *SimpleNamedFragmentRandomItemTopic) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
|
||||
}
|
||||
func (v *SimpleNamedFragmentRandomItemVideo) implementsGraphQLInterfaceSimpleNamedFragmentRandomItemContent() {
|
||||
}
|
||||
|
||||
func __unmarshalSimpleNamedFragmentRandomItemContent(b []byte, v *SimpleNamedFragmentRandomItemContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -73,12 +73,12 @@ func __unmarshalSimpleNamedFragmentRandomItemContent(b []byte, v *SimpleNamedFra
|
||||
case "Article":
|
||||
*v = new(SimpleNamedFragmentRandomItemArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(SimpleNamedFragmentRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(SimpleNamedFragmentRandomItemTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(SimpleNamedFragmentRandomItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -100,6 +100,14 @@ func __marshalSimpleNamedFragmentRandomItemContent(v *SimpleNamedFragmentRandomI
|
||||
*SimpleNamedFragmentRandomItemArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *SimpleNamedFragmentRandomItemTopic:
|
||||
typename = "Topic"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*SimpleNamedFragmentRandomItemTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *SimpleNamedFragmentRandomItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
@@ -112,14 +120,6 @@ func __marshalSimpleNamedFragmentRandomItemContent(v *SimpleNamedFragmentRandomI
|
||||
*__premarshalSimpleNamedFragmentRandomItemVideo
|
||||
}{typename, premarshaled}
|
||||
return json.Marshal(result)
|
||||
case *SimpleNamedFragmentRandomItemTopic:
|
||||
typename = "Topic"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*SimpleNamedFragmentRandomItemTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
+14
-14
@@ -220,8 +220,8 @@ func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle
|
||||
//
|
||||
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent is implemented by the following types:
|
||||
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle
|
||||
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo
|
||||
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic
|
||||
// StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -238,10 +238,10 @@ type StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent int
|
||||
|
||||
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
|
||||
}
|
||||
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
|
||||
}
|
||||
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
|
||||
}
|
||||
func (v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo) implementsGraphQLInterfaceStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent() {
|
||||
}
|
||||
|
||||
func __unmarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent(b []byte, v *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenContent) error {
|
||||
if string(b) == "null" {
|
||||
@@ -260,12 +260,12 @@ func __unmarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildren
|
||||
case "Article":
|
||||
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -287,6 +287,14 @@ func __marshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenCo
|
||||
*StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo:
|
||||
typename = "Video"
|
||||
|
||||
@@ -299,14 +307,6 @@ func __marshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenCo
|
||||
*__premarshalStructOptionRootTopicChildrenContentParentTopicInterfaceChildrenVideo
|
||||
}{typename, premarshaled}
|
||||
return json.Marshal(result)
|
||||
case *StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic:
|
||||
typename = "Topic"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*StructOptionRootTopicChildrenContentParentTopicInterfaceChildrenTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
+13
-13
@@ -14,8 +14,8 @@ import (
|
||||
//
|
||||
// Item is implemented by the following types:
|
||||
// ItemArticle
|
||||
// ItemVideo
|
||||
// ItemTopic
|
||||
// ItemVideo
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// Content is implemented by various types like Article, Video, and Topic.
|
||||
@@ -33,8 +33,8 @@ type Item interface {
|
||||
}
|
||||
|
||||
func (v *ItemArticle) implementsGraphQLInterfaceItem() {}
|
||||
func (v *ItemVideo) implementsGraphQLInterfaceItem() {}
|
||||
func (v *ItemTopic) implementsGraphQLInterfaceItem() {}
|
||||
func (v *ItemVideo) implementsGraphQLInterfaceItem() {}
|
||||
|
||||
func __unmarshalItem(b []byte, v *Item) error {
|
||||
if string(b) == "null" {
|
||||
@@ -53,12 +53,12 @@ func __unmarshalItem(b []byte, v *Item) error {
|
||||
case "Article":
|
||||
*v = new(ItemArticle)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Topic":
|
||||
*v = new(ItemTopic)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "Video":
|
||||
*v = new(ItemVideo)
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"response was missing Content.__typename")
|
||||
@@ -80,14 +80,6 @@ func __marshalItem(v *Item) ([]byte, error) {
|
||||
*ItemArticle
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ItemTopic:
|
||||
typename = "Topic"
|
||||
|
||||
@@ -96,6 +88,14 @@ func __marshalItem(v *Item) ([]byte, error) {
|
||||
*ItemTopic
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case *ItemVideo:
|
||||
typename = "Video"
|
||||
|
||||
result := struct {
|
||||
TypeName string `json:"__typename"`
|
||||
*ItemVideo
|
||||
}{typename, v}
|
||||
return json.Marshal(result)
|
||||
case nil:
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user