Search API considerations
From argument single class or multiple joined classes
The “from” argument in any of the search queries – documents(), folders(), etc. – in general can take any specification allowed by the CE query SQL syntax. This can be the name of a single class – for example “Document”. For documents() and folders() it is optional and if not specified, the appropriate class – Document or Folder – will be implied.
where condition. For
example:{
documents(
repositoryIdentifier:"OS1"
from:"Document d WITH INCLUDESUBCLASSES"
where:"(ISCLASS(d,MyDocument) OR ISCLASS(d,MyOtherDocument)) AND d.[DateCreated] > 20180815T070000Z AND d.[IsCurrentVersion] = True"
orderBy:"DocumentTitle"
pageSize:20
)
{
...
}
}
The SELECT part of the eventual query is implicitly constructed using information in the output data shaping part of the GraphQL query. Note that the SELECT properties are not explicitly specified in the GraphQL query itself.
Multiple joined classes in the from argument are also supported. Refer to later
examples with details involving joined classes.
OrderBy argument and data shaping
Any orderBy properties are automatically added into the SELECT portion of the SQL if not already represented in the output data shaping. The SELECT part of the eventual SQL query is implicitly constructed from the output data shaping as well as the orderBy argument.