-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hello, I'm trying do make a query with relation. I can get the correct result from hasMany relation but when I try with a belongsTo relation the return is null, see Solicitante and TipoDespesa. Does anyone can see what I'm doing wrong? When I call the find method on loopback explorer with these relation I can get all the informations.
Query
{
Solicitacao{
SolicitacaoFind(
filter: {
where: { Codigo: 4},
include: ["Solicitante", "SolicitacaoItens"]
}
options: {}) {
edges {
node {
Codigo,
Solicitante {
username,
email
}
SolicitacaoItens {
edges {
node {
CodigoTipoSolicitacaoItem,
QuantidadeComprovantes,
TipoDespesa {
Codigo,
Descricao,
CodigoSAP
}
}
}
}
}
}
}
}
}
Result
{
"data": {
"Solicitacao": {
"SolicitacaoFind": {
"edges": [
{
"node": {
"Codigo": 4,
"Solicitante": null,
"SolicitacaoItens": {
"edges": [
{
"node": {
"CodigoTipoSolicitacaoItem": 9,
"QuantidadeComprovantes": 150,
"TipoDespesa": null
}
},
{
"node": {
"CodigoTipoSolicitacaoItem": 4,
"QuantidadeComprovantes": 105,
"TipoDespesa": null
}
},
{
"node": {
"CodigoTipoSolicitacaoItem": 9,
"QuantidadeComprovantes": 300,
"TipoDespesa": null
}
}
]
}
}
}
]
}
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels