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 commentline commentline comment-- comment-- comment
Starts with
--and ends at the end of the line.- Anchor to block commentblock commentblock comment/* comment *//* comment */
Starts with
/*, ends with*/, and can span multiple lines.
Anchor to Line commentsLine comments
Use a line comment to leave a short note next to a clause, or to disable a single line while you test a query.
Anchor to Block commentsBlock comments
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?