forked from hasura/graphql-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip ci] fix introspection query if any enum column present in prima…
…ry key (fix hasura#5200) (hasura#5522)
- Loading branch information
Showing
5 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
server/tests-py/queries/graphql_query/enums/introspect_user_role.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# https://github.com/hasura/graphql-engine/issues/5200 | ||
description: Test introspecting enum types as user role | ||
url: /v1/graphql | ||
status: 200 | ||
headers: | ||
X-Hasura-Role: user | ||
response: | ||
data: | ||
country: | ||
kind: ENUM | ||
name: country_enum | ||
enumValues: | ||
- name: India | ||
description: Republic of India | ||
- name: USA | ||
description: United States of America | ||
zones: | ||
fields: | ||
- name: code | ||
type: | ||
ofType: | ||
name: String | ||
- name: id | ||
type: | ||
ofType: | ||
name: Int | ||
query: | ||
query: | | ||
{ | ||
country: __type(name: "country_enum") { | ||
name | ||
kind | ||
enumValues { | ||
name | ||
description | ||
} | ||
} | ||
zones: __type(name: "zones") { | ||
fields { | ||
name | ||
type { | ||
ofType { | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,6 @@ args: | |
sql: | | ||
DROP TABLE users; | ||
DROP TABLE colors; | ||
DROP TABLE zones; | ||
DROP TABLE country; | ||
cascade: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters