Skip to main content
Version: 2024.3

DataObject Queries

Suppored Data Types​

Also check out the Pimcore's data type documentation.

  • Advanced Many-to-Many Relation
  • Advanced Many-to-Many Object Relation
  • Block
  • Boolean Select
  • Calculated Value
  • Checkbox
  • Classification Store
  • Country
  • Countries (Multiselect)
  • Date
  • DateTime
  • Email
  • External Image
  • Gender
  • Field-Collections
  • Firstname
  • Geobounds
  • Geopoint
  • Geopolygon
  • Image
  • Image Advanced
  • Input
  • InputQuantityValue
  • Language
  • Languages (Multiselect)
  • Lastname
  • Link
  • Many-to-One Relation
  • Many-to-Many Relation
  • Many-to-Many Object Relation
  • Multiselect
  • Newsletter Active
  • Newsletter Confirmed
  • Numeric
  • Quantity Value
  • Reverse Many-to-Many Object Relation
  • RgbaColor
  • Select
  • Slider
  • StructuredTable
  • Table
  • Textarea
  • Time
  • URL Slug
  • Video
  • Wysiwyg

Available Query Operators​

Check out the operators section for more information.

Get single Data Object​

Base structure for getting single data object:

{
getNews(id: 4) {
...
}
}

Get List of Data Objects​

Base structure for getting a list of data objects, restricted by IDs:

{
getNewsListing(ids: "4,5") {
edges {
...

Base structure for getting a list of data objects, restricted by fullpath:

{
getNewsListing(fullpaths: "/NewsArticle,/NewsArticle2") {
totalCount
edges {
node {
id
}
}
}
}

Sometimes it can happen that the fullpath already contains a comma. To make sure the comma is not interpreted as a list separator in this case, you can quote the path:

{
getNewsListing(fullpaths: "'/NewsArticle,Headline','/NewsArticle2'") {
totalCount
edges {
node {
id
}
}
}
}

Pagination​

Pagination can be applied as query parameters.

{
# 'first' is the limit
# 'after' the offset
getManufacturerListing(first: 3, after: 1) {
edges {
node {
id
name
}
}
}
}

Simple Sorting​

Sorting can be applied as query parameters, for example sort by name, descending.

{
getManufacturerListing(sortBy: "name", sortOrder: "DESC") {
edges {
node {
id
name
}
}
}
}

Filtering​

You can use Pimcore's webservice filter logic as described here for filtering listing requests.

For details see filtering documentation page

Localization of Queries​

Queries can be localized For details see the localization documentation page.

Extend Data Object Queries​

It is possible to add custom query data types and query operators. For details see detail documentation pages:

More Examples​

See following list for more examples with data object queries: