Skip to content

Instantly share code, notes, and snippets.

@ProbablyBrianBurgess
Last active October 9, 2023 18:44
Show Gist options
  • Save ProbablyBrianBurgess/10f5138192936994ba8c6574e77452d0 to your computer and use it in GitHub Desktop.
Save ProbablyBrianBurgess/10f5138192936994ba8c6574e77452d0 to your computer and use it in GitHub Desktop.
a b c d
hello world 1 3
hello2 2 6
hello3 world3 9 5
{
"errors": [
{
"message": "Cannot return null for non-nullable field HelloAggregates.keys.",
"locations": [
{
"line": 13,
"column": 7
}
],
"path": [
"hellos",
"groupedAggregates",
2,
"keys",
0
]
}
],
"data": {
"hellos": {
"groupedAggregates": [
{
"keys": [
"world",
"1",
"3"
],
"distinctCount": {
"a": "1"
}
},
{
"keys": [
"world3",
"9",
"5"
],
"distinctCount": {
"a": "1"
}
},
{
"keys": null,
"distinctCount": {
"a": "1"
}
}
]
}
}
}
query GetGrouped {
hellos {
groupedAggregates(groupBy: [B, C, D]) {
keys
distinctCount {
a
}
}
}
}
create table hello
(
a varchar(100) not null
primary key,
b varchar(100),
c integer,
d integer
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment