Retrieving multiple Companies
The following example looks up the available companies from your BaseCMS instance.
To query content via the GraphQL API, utilize the allPublishedContent
query.
query AllCompanies($input: AllPublishedContentQueryInput!) {
allPublishedContent(input: $input) {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
type
name
... on ContentCompany {
companyType
# ...
}
}
}
}
}
{
"input": {
"includeContentTypes": ["Company"]
}
}
{
"data": {
"allPublishedContent": {
"pageInfo": {
"hasNextPage": true,
"endCursor": "MjEwMjQwOTc"
},
"edges": [
{
"node": {
"id": 21104816,
"type": "company",
"name": "FolderWorks by Navitor",
"companyType": null
}
},
{
"node": {
"id": 21083690,
"type": "company",
"name": "drupa",
"companyType": "Unknown"
}
}
# ...
]
}
}
}