File tree 1 file changed +13
-13
lines changed
server/tests-py/queries/graphql_query/enums
1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
# https://github.com/hasura/graphql-engine/issues/5200
2
+
3
+ # NOTE:-
4
+ # The GraphQL schema generation refactor (https://github.com/hasura/graphql-engine/pull/4111) auto fixes the
5
+ # aforementioned issue, but in different way, by restricting the generation of *_by_pk root fields
6
+ # when all primary key columns are not marked for selection in permission. The actual fix
7
+ # (https://github.com/hasura/graphql-engine/pull/5522) is to generate the typeinfos for all primary key columns
8
+ # irrespective of select permissions. So, the test case is modified accordingly to check
9
+ # the absence of zones_by_pk query root field.
2
10
description : Test introspecting enum types as user role
3
11
url : /v1/graphql
4
12
status : 200
5
13
headers :
6
14
X-Hasura-Role : user
7
15
response :
8
16
data :
9
- country :
10
- kind : ENUM
11
- name : country_enum
12
- enumValues :
13
- - name : India
14
- description : Republic of India
15
- - name : USA
16
- description : United States of America
17
+ query_root_fields :
18
+ fields :
19
+ - name : zones
17
20
zones :
18
21
fields :
19
22
- name : code
@@ -27,12 +30,9 @@ response:
27
30
query :
28
31
query : |
29
32
{
30
- country: __type(name: "country_enum") {
31
- name
32
- kind
33
- enumValues {
33
+ query_root_fields: __type(name: "query_root") {
34
+ fields {
34
35
name
35
- description
36
36
}
37
37
}
38
38
zones: __type(name: "zones") {
You can’t perform that action at this time.
0 commit comments