Mathias Kandelborg
10/19/2018, 1:34 PMconst order = await ctx.db.query.order({ where: { id } });
and log the result; all of the fields aren't retrieved. I'm baffled by this, there's no apparent explanation and of course no errors. So how do i retrieve all the fields from my type? And as an extra, why aren't they already retrieved?
I'm sorry if this message is too long, furthermore I'd like to acknowledge my lack of technical information. I'd be happy to elaborate on anything.
Anyways, have a nice day! ☀️lawjolla
10/19/2018, 4:45 PMstring
. It will not get the relational data. To get the queried relational data, you need to pass the info object, e.g. const order = await ctx.db.query.order({ where: { id } }, info);
I recommend reading and rereading the following blog post daily, as I have done. 🙂 https://www.prisma.io/blog/graphql-server-basics-demystifying-the-info-argument-in-graphql-resolvers-6f26249f613a/Mathias Kandelborg
10/21/2018, 3:00 PM