mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-03 05:08:47 +03:00
2a9bc2354f
* validation support for unions and interfaces * refactor SQL generation logic for improved readability * '/v1/relay' endpoint for relay schema * implement 'Node' interface and top level 'node' field resolver * add relay toggle on graphiql * fix explain api response & index plan id with query type * add hasura mutations to relay * add relay pytests * update CHANGELOG.md Co-authored-by: rakeshkky <12475069+rakeshkky@users.noreply.github.com> Co-authored-by: Rishichandra Wawhal <rishi@hasura.io> Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
description: Query the relay Node interface
|
|
url: /v1/relay
|
|
status: 200
|
|
query:
|
|
variables:
|
|
author_id: eyJ0YWJsZSIgOiB7InNjaGVtYSIgOiAicHVibGljIiwgIm5hbWUiIDogImF1dGhvciJ9LCAiY29sdW1ucyIgOiB7ImlkIiA6IDJ9fQ==
|
|
article_id: eyJ0YWJsZSIgOiB7InNjaGVtYSIgOiAicHVibGljIiwgIm5hbWUiIDogImFydGljbGUifSwgImNvbHVtbnMiIDogeyJpZCIgOiAzfX0=
|
|
query: |
|
|
query nodeQuery($author_id: ID!, $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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
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: eyJ0YWJsZSIgOiB7InNjaGVtYSIgOiAicHVibGljIiwgIm5hbWUiIDogImF1dGhvciJ9LCAiY29sdW1ucyIgOiB7ImlkIiA6IDJ9fQ==
|
|
article_node:
|
|
__typename: article
|
|
title: Article 3
|
|
content: Sample article content 3
|
|
author:
|
|
name: Author 1
|