How Many Documents?

In addition to querying your content, you can also count what is in your Graphlit project.

Document Count

Here is an example of counting your documents:

Content file types can be one of ANIMATION, AUDIO, DATA, DOCUMENT, DRAWING, EMAIL, GEOMETRY, IMAGE, PACKAGE, POINT_CLOUD, SHAPE, VIDEO.

Query:

query CountContents($filter: ContentFilter!) {
  countContents(filter: $filter) {
    count
  }
}

Variables:

{
  "filter": {
    "fileTypes": [
      "DOCUMENT"
    ]
  }
}

Response:

{
  "count": 2
}

Web Page Count

Here is an example of counting your web pages:

Content types can be one of FILE, PAGE, POST, MESSAGE, EMAIL, EVENT.

Query:

query CountContents($filter: ContentFilter!) {
  countContents(filter: $filter) {
    count
  }
}

Variables:

{
  "filter": {
    "types": [
      "PAGE"
    ]
  }
}

Response:

{
  "count": 1
}

Last updated