Skip to main content

Comments

Comments are notes that you add to a ShopifyQL query. ShopifyQL ignores them when it runs the query, so they don't change the results. Use them to document what a query does or to stop part of it from running while you test.

Comments can explain sections of a query or prevent execution of query text.

Anchor to line comment
line comment
-- comment

Starts with -- and ends at the end of the line.

Anchor to block comment
block comment
/* comment */

Starts with /*, ends with */, and can span multiple lines.


Use a line comment to leave a short note next to a clause, or to disable a single line while you test a query.


Use a block comment for a longer note, such as what a saved query is for or who maintains it, or to disable several lines at once. A block comment can sit anywhere in a query, not just at the top.


Was this page helpful?