In the graphQL documantation I found the directives @include and @skip
https://graphql.org/learn/queries/#directives
I tried this but I get a Bad Request error:
“message”: “Schema wrapper error: GraphQL validation error: GraphQL validation error: Unknown argument "if" on field "Vertrag.anlagen".”,
Here is the schema definition of the query:
getCurrentVertraegeWithAnlage(hik: Int!, stichtag: DueDate!, withAnlage: Boolean ): [Vertrag]
@bb_resolver(
_type: SELECT,
_object: Vertrag,
_filter: { hik: { _eq: "$hik" }, gueltigbis: { _gte: "$stichtag" } })
The query I send:
query getdata($withAnlage: Boolean!)
{ getCurrentVertraegeWithAnlage(hik: 123456789, stichtag: "2024-05-08", withAnlage: $withAnlage) {
name,
id,
anlagen @include(if: $withAnlage) {id, name, gueltigvon, gueltigbis }
}
}
Variables:
{
"withAnlage": false
}
Question: Is the @include directive supported? Do you have a working example for it?
Do you have a list of GraphQL features that are supported?
What about Pagination? Pagination | GraphQL