mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
This commit is contained in:
parent
01e7b2aea0
commit
c7ffd882d0
@ -215,7 +215,9 @@ mkTableObjectFields isRelay =
|
||||
SFPGColumn info -> pure $ mkPGColFld info
|
||||
SFRelationship info -> mkRelationshipField isRelay info
|
||||
SFComputedField info -> pure $ mkComputedFieldFld info
|
||||
SFRemoteRelationship info -> pure $ mkRemoteRelationshipFld info
|
||||
SFRemoteRelationship info ->
|
||||
-- https://github.com/hasura/graphql-engine/issues/5144
|
||||
if isRelay then [] else pure $ mkRemoteRelationshipFld info
|
||||
|
||||
{-
|
||||
type table {
|
||||
|
@ -0,0 +1,27 @@
|
||||
# https://github.com/hasura/graphql-engine/issues/5144
|
||||
description: Test remote relationships via relay endpoint
|
||||
url: /v1/relay
|
||||
status: 200
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
profiles_connection{
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
name
|
||||
messageBasic {
|
||||
id
|
||||
msg
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
response:
|
||||
errors:
|
||||
- extensions:
|
||||
path: $.selectionSet.profiles_connection.selectionSet.edges.selectionSet.node.selectionSet.messageBasic
|
||||
code: validation-failed
|
||||
message: "field \"messageBasic\" not found in type: 'profiles'"
|
@ -292,3 +292,15 @@ class TestExecutionWithPermissions:
|
||||
st_code, resp = hge_ctx.v1q_f(self.dir() + 'setup_multiple_remote_rel.yaml')
|
||||
assert st_code == 200, resp
|
||||
check_query_f(hge_ctx, self.dir() + 'complex_multiple_joins.yaml')
|
||||
|
||||
@use_test_fixtures
|
||||
class TestWithRelay:
|
||||
|
||||
@classmethod
|
||||
def dir(cls):
|
||||
return "queries/remote_schemas/remote_relationships/"
|
||||
|
||||
def test_with_relay_fail(self, hge_ctx):
|
||||
st_code, resp = hge_ctx.v1q_f(self.dir() + 'setup_remote_rel_basic.yaml')
|
||||
assert st_code == 200, resp
|
||||
check_query_f(hge_ctx, self.dir() + "with_relay.yaml")
|
||||
|
Loading…
Reference in New Issue
Block a user