Union Does not operate on pages

This is probably an error in the docs?

It says in the docs here at Data Types > Pages Data types - Fauna Documentation

that Union can operate on pages, however. I find that to not be the case:

Union(Paginate(Documents(Collection("things"))))

Error: [
  {
    "position": [
      "union"
    ],
    "code": "invalid argument",
    "description": "Set or Array expected, Page provided."
  }
]
1 Like

Thank you for reporting, @hunp!

That’s right: you can Paginate a Union, but you can’t Union a Page.

For what it’s worth, the documentation for Union is correct :slight_smile: but the data-type docs need to be updated. I am filing an internal ticket to get that prioritized and done. The same will apply for some other Set operations like Intersection and Difference, so we’ll need to review the list.

Thanks again!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.