Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/graphql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,9 @@ impl ___Type for QueryType {

let collection_entrypoint = __Field {
name_: format!("{}Collection", lowercase_first_letter(table_base_type_name)),
type_: __Type::Connection(connection_type),
type_: __Type::NonNull(NonNullType {
type_: Box::new(__Type::Connection(connection_type)),
}),
args: connection_args,
description: Some(format!(
"A pagable collection of type `{}`",
Expand Down
28 changes: 23 additions & 5 deletions test/expected/function_calls.out
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,11 @@ begin;
description
type {
kind
name
ofType {
kind
name
}
}
args {
name
Expand Down Expand Up @@ -2108,7 +2113,12 @@ begin;
], +
"name": "accountCollection", +
"type": { +
"kind": "OBJECT" +
"kind": "NON_NULL", +
"name": null, +
"ofType": { +
"kind": "OBJECT", +
"name": "AccountConnection" +
} +
}, +
"description": "A pagable collection of type `Account`"+
}, +
Expand All @@ -2128,7 +2138,9 @@ begin;
], +
"name": "node", +
"type": { +
"kind": "INTERFACE" +
"kind": "INTERFACE", +
"name": "Node", +
"ofType": null +
}, +
"description": "Retrieve a record by its `ID`" +
}, +
Expand All @@ -2137,7 +2149,9 @@ begin;
], +
"name": "returnsAccount", +
"type": { +
"kind": "OBJECT" +
"kind": "OBJECT", +
"name": "Account", +
"ofType": null +
}, +
"description": null +
}, +
Expand All @@ -2157,7 +2171,9 @@ begin;
], +
"name": "returnsAccountWithId", +
"type": { +
"kind": "OBJECT" +
"kind": "OBJECT", +
"name": "Account", +
"ofType": null +
}, +
"description": null +
}, +
Expand Down Expand Up @@ -2236,7 +2252,9 @@ begin;
], +
"name": "returnsSetofAccount", +
"type": { +
"kind": "OBJECT" +
"kind": "OBJECT", +
"name": "AccountConnection", +
"ofType": null +
}, +
"description": null +
} +
Expand Down
16 changes: 14 additions & 2 deletions test/expected/function_calls_unsupported.out
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ begin;
description
type {
kind
name
ofType {
kind
name
}
}
args {
name
Expand Down Expand Up @@ -357,7 +362,12 @@ begin;
], +
"name": "accountCollection", +
"type": { +
"kind": "OBJECT" +
"kind": "NON_NULL", +
"name": null, +
"ofType": { +
"kind": "OBJECT", +
"name": "AccountConnection" +
} +
}, +
"description": "A pagable collection of type `Account`"+
}, +
Expand All @@ -372,7 +382,9 @@ begin;
], +
"name": "node", +
"type": { +
"kind": "INTERFACE" +
"kind": "INTERFACE", +
"name": "Node", +
"ofType": null +
}, +
"description": "Retrieve a record by its `ID`" +
} +
Expand Down
Loading