-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathRichTextExampleProjectsQuery.graphql.swift
More file actions
156 lines (134 loc) · 5.22 KB
/
RichTextExampleProjectsQuery.graphql.swift
File metadata and controls
156 lines (134 loc) · 5.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// @generated
// This file was automatically generated and should not be edited.
@_exported import ApolloAPI
public class RichTextExampleProjectsQuery: GraphQLQuery {
public static let operationName: String = "RichTextExampleProjectsQuery"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
definition: .init(
#"query RichTextExampleProjectsQuery { projects(recommended: true, first: 10) { __typename nodes { __typename id name storyRichText { __typename ...RichTextComponentFragment } } } }"#,
fragments: [RichTextComponentFragment.self, RichTextItemFragment.self]
))
public init() {}
public struct Data: GraphAPI.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: ApolloAPI.ParentType { GraphAPI.Objects.Query }
public static var __selections: [ApolloAPI.Selection] { [
.field("projects", Projects?.self, arguments: [
"recommended": true,
"first": 10
]),
] }
/// Get some projects
public var projects: Projects? { __data["projects"] }
public init(
projects: Projects? = nil
) {
self.init(_dataDict: DataDict(
data: [
"__typename": GraphAPI.Objects.Query.typename,
"projects": projects._fieldData,
],
fulfilledFragments: [
ObjectIdentifier(RichTextExampleProjectsQuery.Data.self)
]
))
}
/// Projects
///
/// Parent Type: `ProjectsConnectionWithTotalCount`
public struct Projects: GraphAPI.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: ApolloAPI.ParentType { GraphAPI.Objects.ProjectsConnectionWithTotalCount }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("nodes", [Node?]?.self),
] }
/// A list of nodes.
public var nodes: [Node?]? { __data["nodes"] }
public init(
nodes: [Node?]? = nil
) {
self.init(_dataDict: DataDict(
data: [
"__typename": GraphAPI.Objects.ProjectsConnectionWithTotalCount.typename,
"nodes": nodes._fieldData,
],
fulfilledFragments: [
ObjectIdentifier(RichTextExampleProjectsQuery.Data.Projects.self)
]
))
}
/// Projects.Node
///
/// Parent Type: `Project`
public struct Node: GraphAPI.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: ApolloAPI.ParentType { GraphAPI.Objects.Project }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("id", GraphAPI.ID.self),
.field("name", String.self),
.field("storyRichText", StoryRichText.self),
] }
public var id: GraphAPI.ID { __data["id"] }
/// The project's name.
public var name: String { __data["name"] }
/// Return an itemized version of the story. This feature is in BETA: types can change anytime!
public var storyRichText: StoryRichText { __data["storyRichText"] }
public init(
id: GraphAPI.ID,
name: String,
storyRichText: StoryRichText
) {
self.init(_dataDict: DataDict(
data: [
"__typename": GraphAPI.Objects.Project.typename,
"id": id,
"name": name,
"storyRichText": storyRichText._fieldData,
],
fulfilledFragments: [
ObjectIdentifier(RichTextExampleProjectsQuery.Data.Projects.Node.self)
]
))
}
/// Projects.Node.StoryRichText
///
/// Parent Type: `RichTextComponent`
public struct StoryRichText: GraphAPI.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: ApolloAPI.ParentType { GraphAPI.Objects.RichTextComponent }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.fragment(RichTextComponentFragment.self),
] }
public var items: [Item] { __data["items"] }
public struct Fragments: FragmentContainer {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public var richTextComponentFragment: RichTextComponentFragment { _toFragment() }
}
public init(
items: [Item]
) {
self.init(_dataDict: DataDict(
data: [
"__typename": GraphAPI.Objects.RichTextComponent.typename,
"items": items._fieldData,
],
fulfilledFragments: [
ObjectIdentifier(RichTextExampleProjectsQuery.Data.Projects.Node.StoryRichText.self),
ObjectIdentifier(RichTextComponentFragment.self)
]
))
}
public typealias Item = RichTextComponentFragment.Item
}
}
}
}
}