I am trying to retrive collection using title but Iam getting error

{collections(query:name:Test){edges{node{id,title}}}}

“errors”:[{“message”:“Parse error on ":" (COLON) at [1, 24]”,“locations”:[{“line”:1,“column”:24}]}]

Can someone help me?

Hi @Its_Cherry

A couple corrections for your query - you’ll want to use the title field rather name, as name is not a valid field in collection and wrap the query in quotes. Also, you’ll need to specify a first or last value in order to limit the number of collections retrieved. Example:

{
collections(query: “title:TEST”, first: 10) {
edges {
node {
id
title
}
}
}
}

Hope this helps!