Hello i'm trying to fetch some data in my mongoDB collections through graphQL,
Here's my graphQl schema :
type Account {
_id: String
id: String
account_id: Int
limit: Int!
products: [String]
}
type Query {
account(_id: String): [Account]
}
Here's a console log of the resolver return
[ { _id: 5ca4bbc7a2dd94ee58162a49,
account_id: 142442,
limit: 9000,
products:
[ 'Commodity',
'CurrencyService',
'Derivatives',
'InvestmentFund',
'InvestmentStock' ],
id: '5ca4bbc7a2dd94ee58162a49' } ]
but here's the query returns from graphiQL
{
"data": {
"account": [
{
"id": "5ca4bbc7a2dd94ee58162a49",
"_id": "5ca4bbc7a2dd94ee58162a49",
"account_id": null,
"limit": 9000,
"products": null
}
]
}
}
I can't figure out why my products and account_id fields return a null value, they seems to have the correct type, did i miss something ?