mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-21 06:21:39 +03:00
67a9045328
A pull request for cleaning up small issues, bugs, redundancies and missing things in the BigQuery backend. Summary: 1. Remove duplicate projection fields - BigQuery rejects these. 2. Add order_by to the test suite cases, as it was returning inconsistent results. 3. Add lots of in FromIr about how the dataloader approach is given support. 4. Produce the correct output structure for aggregates: a. Should be a singleton object for a top-level aggregate query. b. Should have appropriate aggregate{} and nodes{} labels. c. **Support for nodes** (via array_agg). 5. Smooth over support of array aggregates by removing the fields used for joining with an explicit projection of each wanted field. https://github.com/hasura/graphql-engine-mono/pull/1317 Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com> GitOrigin-RevId: cd3899f4667770a27055f94988ef2a6d5808f1f5
72 lines
1.5 KiB
YAML
72 lines
1.5 KiB
YAML
- description: test that aggregates with no results are returned as special structs with structure preserving nulls
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
query MyQuery {
|
|
hasura_author {
|
|
id
|
|
articles_aggregate(offset: 10) {
|
|
aggregate {
|
|
count(distinct: true)
|
|
max {
|
|
is_published
|
|
}
|
|
min {
|
|
is_published
|
|
}
|
|
sum {
|
|
id
|
|
author_id
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
hasura_author:
|
|
- id: '1'
|
|
articles_aggregate:
|
|
aggregate:
|
|
count: '0'
|
|
max:
|
|
is_published: null
|
|
min:
|
|
is_published: null
|
|
sum:
|
|
id: null
|
|
author_id: null
|
|
- id: '2'
|
|
articles_aggregate:
|
|
aggregate:
|
|
count: '0'
|
|
max:
|
|
is_published: null
|
|
min:
|
|
is_published: null
|
|
sum:
|
|
id: null
|
|
author_id: null
|
|
|
|
- description: test that null object joins result in expected structures
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
query MyQuery {
|
|
hasura_article(offset: 10) {
|
|
id
|
|
author {
|
|
id
|
|
name
|
|
articles {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
hasura_article: []
|