graphql-engine/server/tests-py/queries/graphql_query/relay/basic/node.yaml
Rakesh Emmadi 2fe353a294
allow array relation connection fields regardless of aggregation permission & change relay endpoint to '/v1beta1/relay' (fix #5218) (#5257)
* fix error when array relation connections are queried, fix #5218

* change relay endpoint to '/v1beta1/relay'

* Update CHANGELOG.md

Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
2020-07-03 12:00:35 +05:30

76 lines
1.7 KiB
YAML

description: Query the relay Node interface
url: /v1beta1/relay
status: 200
query:
variables:
author_id: WzEsICJwdWJsaWMiLCJhdXRob3IiLDJdCg==
article_id: WzEsInB1YmxpYyIsImFydGljbGUiLDNdCg==
non_exist_article_id: WzEsInB1YmxpYyIsImFydGljbGUiLDEwMF0K
query: |
query nodeQuery($author_id: ID!, $article_id: ID!, $non_exist_article_id: ID!){
author_node: node(id: $author_id){
__typename
... on author{
name
articles_connection{
edges{
cursor
node{
title
content
}
}
}
}
}
article_node_with_author_id: node(id: $author_id){
id
... on article{
title
content
}
}
article_node: node(id: $article_id){
__typename
... on article{
title
content
author{
name
}
}
}
non_exist_article: node(id: $non_exist_article_id){
... on article{
title
content
}
}
}
response:
data:
author_node:
__typename: author
name: Author 2
articles_connection:
edges:
- cursor: eyJpZCIgOiA0fQ==
node:
title: Article 4
content: Sample article content 4
- cursor: eyJpZCIgOiA1fQ==
node:
title: Article 5
content: Sample article content 5
article_node_with_author_id:
id: WzEsICJwdWJsaWMiLCAiYXV0aG9yIiwgMl0=
article_node:
__typename: article
title: Article 3
content: Sample article content 3
author:
name: Author 1
non_exist_article: null