You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export const Products = objectType({
name: 'Products',
definition(t) {
t.id('id');
t.int('total', {
async resolve(parent, _args, ctx) {
return 100;
}});
t.string('layout', {
async resolve(parent, _args, ctx, info) {
// need to access total value here,
// i assume total gets resolved first and total value //should be available via parent but its not.
},
});
}
})
i need to access one resolved field value, in another field of a objectType.
In the above example, i need to access total inside, layout field, my assumption is total gets resolved first and is available via parent, but it is not.
Is there any way i can access total in layout?
The text was updated successfully, but these errors were encountered:
i need to access one resolved field value, in another field of a objectType.
In the above example, i need to access total inside, layout field, my assumption is total gets resolved first and is available via parent, but it is not.
Is there any way i can access total in layout?
The text was updated successfully, but these errors were encountered: