mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 12:31:52 +03:00
960cf2d954
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3636 GitOrigin-RevId: f4114fded09cbdd9875488610c635537478e4ab5
139 lines
3.2 KiB
YAML
139 lines
3.2 KiB
YAML
- description: Check that object relation in agg nodes work correctly
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
data:
|
|
hasura_article:
|
|
- id: '1'
|
|
title: Title 1
|
|
author:
|
|
id: '1'
|
|
name: Author 1
|
|
articles_aggregate:
|
|
nodes:
|
|
- id: '1'
|
|
title: Title 1
|
|
author:
|
|
id: '1'
|
|
name: Author 1
|
|
- id: '2'
|
|
title: Title 2
|
|
author:
|
|
id: '1'
|
|
name: Author 1
|
|
- id: '2'
|
|
title: Title 2
|
|
author:
|
|
id: '1'
|
|
name: Author 1
|
|
articles_aggregate:
|
|
nodes:
|
|
- id: '1'
|
|
title: Title 1
|
|
author:
|
|
id: '1'
|
|
name: Author 1
|
|
- id: '2'
|
|
title: Title 2
|
|
author:
|
|
id: '1'
|
|
name: Author 1
|
|
- id: '3'
|
|
title: Title 3
|
|
author:
|
|
id: '2'
|
|
name: Author 2
|
|
articles_aggregate:
|
|
nodes:
|
|
- id: '3'
|
|
title: Title 3
|
|
author:
|
|
id: '2'
|
|
name: Author 2
|
|
- id: '4'
|
|
title: Title 4
|
|
author:
|
|
id: '2'
|
|
name: Author 2
|
|
- id: '4'
|
|
title: Title 4
|
|
author:
|
|
id: '2'
|
|
name: Author 2
|
|
articles_aggregate:
|
|
nodes:
|
|
- id: '3'
|
|
title: Title 3
|
|
author:
|
|
id: '2'
|
|
name: Author 2
|
|
- id: '4'
|
|
title: Title 4
|
|
author:
|
|
id: '2'
|
|
name: Author 2
|
|
query:
|
|
query: |
|
|
query {
|
|
hasura_article(order_by: {id: asc}) {
|
|
id
|
|
title
|
|
author {
|
|
id
|
|
name
|
|
articles_aggregate(order_by: {id: asc}) {
|
|
nodes {
|
|
id
|
|
title
|
|
author {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
- description: Check that array relation in agg nodes work correctly
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
data:
|
|
hasura_author:
|
|
- id: '1'
|
|
name: Author 1
|
|
articles_aggregate:
|
|
nodes:
|
|
- title: Title 1
|
|
article_citations:
|
|
- description: citing the 2nd
|
|
- description: citing the third as well
|
|
- title: Title 2
|
|
article_citations:
|
|
- description: the second also cites the third
|
|
- id: '2'
|
|
name: Author 2
|
|
articles_aggregate:
|
|
nodes:
|
|
- title: Title 3
|
|
article_citations: []
|
|
- title: Title 4
|
|
article_citations: []
|
|
query:
|
|
query: |
|
|
query {
|
|
hasura_author(order_by: {id: asc}) {
|
|
id
|
|
name
|
|
articles_aggregate(order_by: {id: asc}) {
|
|
nodes {
|
|
title
|
|
article_citations(order_by: {cited_article_id: asc}) {
|
|
description
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|