Skip to content

fix(query): accept lists in reverse and return them reversed - #1945

Open
katarinasupe wants to merge 2 commits into
release/3.15from
docs/real-local-reverse-list
Open

katarinasupe wants to merge 2 commits into
release/3.15from
docs/real-local-reverse-list

Conversation

@katarinasupe

@katarinasupe katarinasupe commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds the list form of reverse() to the Lists table in pages/querying/functions.mdx: reverse(list: List[any]) -> (List[any]). The string form in the String functions table is unchanged.

Left out of the docs, covered by the release note below: reverse([]) returns [] and reverse(null) returns null, as the neighboring rows leave null and empty input unstated; the type error for other argument types now names list among the accepted types ('reverse' argument at position 1 must be either 'null', 'string' or 'list'.), which no page quotes.

Ran on the 20261122 daily MAGE build (3.14.0+122~34167af2e2b5, the merge commit of memgraph/memgraph#5425; tests passed) and on memgraph/memgraph-mage:3.14.0 for comparison. Lists, the empty list, null, nested values (reversed at the top level only), strings and the error for an integer, a map and a boolean all behave as the product PR describes. On 3.14.0, every list argument failed with 'reverse' argument at position 1 must be either 'null' or 'string'. The page change adds no cypher blocks.

Product PR

memgraph/memgraph#5425

Checklist

  • For a product change: milestone set to the release and feature or bugfix label added
  • For a product change: this PR is linked from the product PR's documentation checklist

Release note

Copied into the release notes when the release is prepared. Fix an item if it's wrong; keep the heading and the item format.

Bug fixes

  • reverse() accepts a list and returns its elements in reverse order.
    #5425

Noticed, not fixed

Read by the release check, which fixes these in one PR per release. Fix an item if it's wrong; keep the heading and one line per item, starting with the page.

  • pages/querying/functions.mdx: the frontmatter description is two marketing sentences ("Unlock the graph analysis potential…") over 160 characters; it should say what the reader can do in one sentence.
  • pages/querying/functions.mdx: in the Pattern functions table, the Name column says gethopsCounter but the signature is getHopsCounter().
  • pages/querying/functions.mdx: in the Lists table, range says "a list of value in given range" and uniformSample lacks a final period.
  • pages/querying/functions.mdx: in the String functions table, the reverse string row says "the order of all characters … have been reversed" (should be "has"), and contains says "has an element which is equal to", which doesn't describe strings.

@katarinasupe katarinasupe added this to the 3.15 milestone Nov 23, 2026
@katarinasupe katarinasupe added the bugfix Documentation related to a product bugfix label Nov 23, 2026
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
documentation Ready Ready Preview Nov 23, 2026 11:06am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — c5f7cdaa Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Documentation related to a product bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant