mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-13 19:33:55 +03:00
server: fix issue when remote relationship col has a custom GQL name
GitOrigin-RevId: ca45383020d0e8f80afb445ab8bb240cc1505ea9
This commit is contained in:
parent
3ad42ed540
commit
0a7d634326
@ -8,6 +8,7 @@
|
||||
|
||||
- server/mssql: support tracking and querying from views
|
||||
- server: inherited roles for PG queries and subscription
|
||||
- server: fix issue when a remote relationship's joining field had a custom GraphQL name defined (fix #6626)
|
||||
- cli: add support for rest endpoints
|
||||
- cli: support mssql sources
|
||||
- cli: use relative paths in metadata !include directives
|
||||
|
@ -1117,7 +1117,7 @@ remoteRelationshipFieldPG remoteFieldInfo = runMaybeT do
|
||||
hoistMaybe $ Map.lookup remoteSchemaName remoteRelationshipQueryCtx
|
||||
let fieldDefns = map P.fDefinition (piQuery parsedIntrospection)
|
||||
role <- askRoleName
|
||||
let hasuraFieldNames = Set.map (FieldName . G.unName . pgiName) hasuraFields
|
||||
let hasuraFieldNames = Set.map (FieldName . PG.getPGColTxt . pgiColumn) hasuraFields
|
||||
remoteRelationship = RemoteRelationship name source table hasuraFieldNames remoteSchemaName remoteFields
|
||||
(newInpValDefns, remoteFieldParamMap) <-
|
||||
if | role == adminRoleName ->
|
||||
|
@ -8,6 +8,7 @@
|
||||
data:
|
||||
profiles:
|
||||
- id: 1
|
||||
profile_name: alice
|
||||
messageBasic:
|
||||
name: alice
|
||||
query:
|
||||
@ -15,6 +16,7 @@
|
||||
query {
|
||||
profiles {
|
||||
id
|
||||
profile_name
|
||||
messageBasic {
|
||||
name
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
||||
# A top-level object
|
||||
p_1: profiles_by_pk(id: 1) {
|
||||
id
|
||||
name
|
||||
name: profile_name
|
||||
remoteUser {
|
||||
user_id
|
||||
}
|
||||
@ -71,7 +71,7 @@
|
||||
name
|
||||
msg
|
||||
}
|
||||
name
|
||||
name: profile_name
|
||||
# use alias for kicks:
|
||||
r_user: remoteUser {
|
||||
user_id
|
||||
@ -80,7 +80,7 @@
|
||||
# A top-level object
|
||||
profiles_by_pk(id: 2) {
|
||||
id
|
||||
name
|
||||
name: profile_name
|
||||
remoteUser {
|
||||
user_id
|
||||
}
|
||||
@ -117,7 +117,7 @@
|
||||
# A top-level object
|
||||
p_1: profiles_by_pk(id: 1) {
|
||||
id
|
||||
name
|
||||
name: profile_name
|
||||
remoteUser {
|
||||
user_id
|
||||
}
|
||||
@ -129,7 +129,7 @@
|
||||
name
|
||||
msg
|
||||
}
|
||||
name
|
||||
name: profile_name
|
||||
# use alias for kicks:
|
||||
r_user: remoteUser {
|
||||
user_id
|
||||
@ -138,7 +138,7 @@
|
||||
# A top-level object (not permitted)
|
||||
profiles_by_pk(id: 2) {
|
||||
id
|
||||
name
|
||||
name: profile_name
|
||||
remoteUser {
|
||||
user_id
|
||||
}
|
||||
@ -172,7 +172,7 @@
|
||||
# A top-level object
|
||||
p_1: profiles_by_pk(id: 1) {
|
||||
id
|
||||
name
|
||||
name: profile_name
|
||||
remoteUser {
|
||||
user_id
|
||||
}
|
||||
@ -184,7 +184,7 @@
|
||||
name
|
||||
msg
|
||||
}
|
||||
name
|
||||
name: profile_name
|
||||
# use alias for kicks:
|
||||
r_user: remoteUser {
|
||||
user_id
|
||||
@ -193,7 +193,7 @@
|
||||
# A top-level object
|
||||
profiles_by_pk(id: 2) {
|
||||
id
|
||||
name
|
||||
name: profile_name
|
||||
remoteUser {
|
||||
user_id
|
||||
}
|
||||
|
@ -33,6 +33,13 @@ args:
|
||||
schema: public
|
||||
name: profiles
|
||||
|
||||
- type: set_table_customization
|
||||
args:
|
||||
table: profiles
|
||||
configuration:
|
||||
custom_column_names:
|
||||
name: profile_name
|
||||
|
||||
- type: create_select_permission
|
||||
args:
|
||||
table:
|
||||
|
Loading…
Reference in New Issue
Block a user