Nexus question: With the new shorthand for queryFi...
# orm-help
h
Nexus question: With the new shorthand for queryField to split queries into multiple files, is there any way to have queries defined as a list type? That is, I have the following code:
Copy code
export const contacts = extendType({
    type: 'Query',
    definition(t) {
        t.list.field('contacts', {
            type: 'Contact',
            resolve: (parent, args, ctx) => { ... },
        })
    },
})
That I wish to shorten tosomething like the following:
Copy code
export const contacts = queryField('contacts', {
    type: 'Contact', // list?
    resolve: (parent, args, ctx) => { ... },
})
w
Copy code
export const contacts = queryField('contacts', {
    type: 'Contact', // list?
    list: true,
    resolve: (parent, args, ctx) => { ... },
})
h
Thank you!
👍 1
w
t.list.field
is a shortcut for
list: true