File tree Expand file tree Collapse file tree 1 file changed +24
-48
lines changed Expand file tree Collapse file tree 1 file changed +24
-48
lines changed Original file line number Diff line number Diff line change @@ -45,19 +45,13 @@ Query examples based on The Starter Kit
45
45
byType {
46
46
People (id : " 1116" ) {
47
47
pageTitle
48
- _contentData {
49
- children {
50
- items {
51
- ... on Person {
52
- _contentData {
53
- name
54
- }
55
- department
56
- photo {
57
- _contentData {
58
- url
59
- }
60
- }
48
+ _children {
49
+ items {
50
+ ... on Person {
51
+ _name
52
+ department
53
+ photo {
54
+ _url
61
55
}
62
56
}
63
57
}
@@ -76,19 +70,13 @@ We can also do some simple filtering and sorting, ([Inspired by the Grahpcool fi
76
70
byType {
77
71
People (id : " 1116" ) {
78
72
pageTitle
79
- _contentData {
80
- peopleStartsWithJ : children (filter : {name_starts_with : " J" }, orderBy : name_ASC ) {
81
- items {
82
- ... on Person {
83
- _contentData {
84
- name
85
- }
86
- department
87
- photo {
88
- _contentData {
89
- url
90
- }
91
- }
73
+ peopleStartsWithJ : _children (filter : {_name_starts_with : " J" }, orderBy : _name_ASC ) {
74
+ items {
75
+ ... on Person {
76
+ _name
77
+ department
78
+ photo {
79
+ _url
92
80
}
93
81
}
94
82
}
@@ -107,11 +95,9 @@ And even query for multiple types at the same time
107
95
byType {
108
96
People (id : " 1116" ) {
109
97
pageTitle
110
- _contentData {
111
- peopleStartsWithJ : children (filter : {name_starts_with : " J" }, orderBy : name_ASC ) {
112
- items {
113
- ... SimplePerson
114
- }
98
+ peopleStartsWithJ : _children (filter : {_name_starts_with : " J" }, orderBy : _name_ASC ) {
99
+ items {
100
+ ... SimplePerson
115
101
}
116
102
}
117
103
}
@@ -121,11 +107,9 @@ And even query for multiple types at the same time
121
107
featuredProducts {
122
108
... SimpleProduct
123
109
}
124
- _contentData {
125
- children {
126
- items {
127
- ... SimpleProduct
128
- }
110
+ _children {
111
+ items {
112
+ ... SimpleProduct
129
113
}
130
114
}
131
115
}
@@ -134,27 +118,19 @@ And even query for multiple types at the same time
134
118
}
135
119
136
120
fragment SimplePerson on Person {
137
- _contentData {
138
- name
139
- }
121
+ _name
140
122
department
141
123
photo {
142
- _contentData {
143
- url
144
- }
124
+ _url
145
125
}
146
126
}
147
127
148
128
fragment SimpleProduct on Product {
149
- _contentData {
150
- name
151
- }
129
+ _name
152
130
price
153
131
sku
154
132
photos {
155
- _contentData {
156
- url
157
- }
133
+ _url
158
134
}
159
135
}
160
136
```
You can’t perform that action at this time.
0 commit comments