Hi there,
I have a collection with following schema:
QuoteInformationSchema = {
name: 'QuoteInformation',
properties: {
_id: 'objectId',
_partition: 'string',
quoteTitle: 'string?',
quoteNumber: 'string?',
quoteSections: 'QuoteInformation_quoteSections[]'
},
primaryKey: '_id',
};
QuoteInformation_quoteSectionsSchema = {
name: 'QuoteInformation_quoteSections',
embedded: true,
properties: {
sectionNumber: 'string?',
sectionTitle: 'string?',
travelExpenses: 'QuoteInformation_quoteSections_travelExpenses[]'
},
};
QuoteInformation_quoteSections_travelExpensesSchema = {
name: 'QuoteInformation_quoteSections_travelExpenses',
embedded: true,
properties: {
travelExpenseId: 'string?',
travelExpensePartition: 'string?',
travelExpenseName: 'string?',
travelExpensePrice: 'string?'
},
};
When I try to get a QuoteInformation object with the following query:
quoteInformation(query: { quoteNumber: "ABC-123" }) {
quoteTitle
quoteSections {
sectionNumber
sectionTitle
travelExpenses {
travelExpenseId
travelExpensePartition
travelExpenseName
travelExpensePrice
}
}
}
I have the following response:
{
"data": {
"quoteInformation": {
"quoteTitle": "Remplacement bloc WC",
"quoteSections": [
{
"sectionNumber": "1",
"sectionTitle": "Mise en oeuvre",
"travelExpenses": [
{
"travelExpenseId": null,
"travelExpenseName": null,
"travelExpensePartition": null,
"travelExpensePrice": null
}
]
}
]
}
}
}
I tried with GraphiQL and with a Flutter app and I have the same answer.
I’m sure that travelExpenseId
, travelExpensePartition
, travelExpenseName
and travelExpensePrice
are not null, so why do I have this response?
Thanks for your help!