-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Documentation Issue
Under the Join field docs, it states that the count option is available for Local API, GraphQL and REST API.
This works for REST API but not GraphQL. Is this an error? Would really like the functionality on GraphQL but the docs are misleading right now.
I have been trying to get to work with GraphQL with no luck, but the REST API works as intended.
https://payloadcms.com/docs/fields/join#query-options
Additional Details
Example Rest Query: https://payloadurl.example/api/categoriesSectors?joins[relatedDocuments][count]=true
GraphQL query:
query Get_RelatedDocs ($type: JSON) {
CategoriesSectors {
docs {
id
title
relatedDocuments(
count:true
where: { type: { equals: $type } }
) {
docs {
id
}
}
}
}
}
results in:
"errors": [
{
"message": "Unknown argument \"count\" on field \"CategoriesSector.relatedDocuments\". Did you mean \"sort\"?",
"locations": [
{
"line": 27,
"column": 11
}
]
}
]
}```
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation