Like single(), this sets the application/vnd.pgrst.object+json accept header so the server enforces a single result. Unlike single(), when the query does not match exactly one row the resulting PGRST116 error is not thrown — the response value is nil instead.
PGRST116 both when zero rows match and when more than one row matches. maybeSingle() returns nil for either case; use single() for the strict variant that always throws when the query does not match exactly one row.let todo: Todo? = try await supabase
.from("todos")
.select()
.eq("id", value: 42)
.maybeSingle()
.execute()
.value