@@ -79,16 +79,16 @@ def test_resolve_product_invalid_id(self):
79
79
def test_resolve_all_products (self ):
80
80
query = """
81
81
query getAllProducts {
82
- allProducts {
83
- edges {
84
- node {
85
- id
86
- name
87
- category {
88
- name
89
- }
90
- }
82
+ products(first: 50) {
83
+ edges {
84
+ node {
85
+ id
86
+ name
87
+ category {
88
+ name
91
89
}
90
+ }
91
+ }
92
92
}
93
93
}
94
94
"""
@@ -98,7 +98,7 @@ def test_resolve_all_products(self):
98
98
response = self .graphql_customer_client .execute (query , context_value = mocked_context )
99
99
100
100
self .assertGraphQLSuccess (response )
101
- products = response ["data" ]["allProducts " ]["edges" ]
101
+ products = response ["data" ]["products " ]["edges" ]
102
102
103
103
self .assertEqual (len (products ), 1 )
104
104
self .assertEqual (products [0 ]["node" ]["name" ], "Test Product" )
@@ -107,66 +107,66 @@ def test_resolve_all_products(self):
107
107
def test_resolve_all_categories (self ):
108
108
query = """
109
109
query getAllCategories {
110
- allCategories {
111
- edges {
112
- node {
113
- id
114
- name
115
- }
110
+ categories(first: 50) {
111
+ edges {
112
+ node {
113
+ id
114
+ name
116
115
}
117
116
}
117
+ }
118
118
}
119
119
"""
120
120
121
121
122
122
response = self .graphql_customer_client .execute (query )
123
123
124
124
self .assertGraphQLSuccess (response , expected_status = 200 )
125
- categories = response ["data" ]["allCategories " ]["edges" ]
125
+ categories = response ["data" ]["categories " ]["edges" ]
126
126
127
127
self .assertEqual (len (categories ), 1 )
128
128
self .assertEqual (categories [0 ]["node" ]["name" ], "Test Category" )
129
129
130
130
def test_resolve_all_collections (self ):
131
131
query = """
132
132
query getAllCollections {
133
- allCollections {
134
- edges {
135
- node {
136
- id
137
- name
138
- }
133
+ collections(first: 50) {
134
+ edges {
135
+ node {
136
+ id
137
+ name
139
138
}
140
139
}
140
+ }
141
141
}
142
142
"""
143
143
144
144
response = self .graphql_customer_client .execute (query )
145
145
146
146
self .assertGraphQLSuccess (response , expected_status = 200 )
147
- collections = response ["data" ]["allCollections " ]["edges" ]
147
+ collections = response ["data" ]["collections " ]["edges" ]
148
148
149
149
self .assertEqual (len (collections ), 1 )
150
150
self .assertEqual (collections [0 ]["node" ]["name" ], "Test Collection" )
151
151
152
152
def test_resolve_all_tags (self ):
153
153
query = """
154
154
query getAllTags {
155
- allTags {
156
- edges {
157
- node {
158
- id
159
- name
160
- }
155
+ tags(first: 50) {
156
+ edges {
157
+ node {
158
+ id
159
+ name
161
160
}
162
161
}
162
+ }
163
163
}
164
164
"""
165
165
166
166
response = self .graphql_customer_client .execute (query )
167
167
168
168
self .assertGraphQLSuccess (response , expected_status = 200 )
169
- tags = response ["data" ]["allTags " ]["edges" ]
169
+ tags = response ["data" ]["tags " ]["edges" ]
170
170
171
171
self .assertEqual (len (tags ), 1 )
172
172
self .assertEqual (tags [0 ]["node" ]["name" ], "Test Tag" )
0 commit comments