Figured it out. In case anyone else is stuck with this problem, I resolved it in with the following code.

const Bookmark = objectType({}) // same as above
const BookmarkList = objectType({
  name: 'BookmarkList',
  definition(t) {
    t.field('bookmarks', {
      type: nonNull(list('Bookmark'))
    })
  }
})
const BookmarkResult = unionType({
  type: 'BookmarkResult',
  definition(t) {
    t.members('BookmarkList', 'NotAllowedError', 'NotFoundError', 'UnknownError')
  }
})
const BookmarkQuery = queryField({}) // same as above
Answer from Joshua Richardson on Stack Overflow
🌐
Nexus Schema
nexusjs.org › docs › api › query-field
queryField
Often times you want to split up query fields into different domains of your application, and like mutationField are another one of the most common use-cases for extendType. queryField exists as a shorthand for this common case:
🌐
Nexus Schema
nexusjs.org › docs
Nexus Documentation (Concepts, Reference & Guides)
Why Nexus? Examples · Guides · Schema · Nullability · Source Types · Abstract Types · Library Authors · Best Practices · Generated Artifacts · API · Introduction · objectType · subscriptionType · unionType · scalarType · interfaceType · enumType · inputObjectType · args · list / nonNull · makeSchema · extendType · mutationField · queryField ·
🌐
Hotexamples
typescript.hotexamples.com › examples › nexus › - › queryField › typescript-queryfield-function-examples.html
TypeScript queryField Examples, nexus.queryField TypeScript Examples - HotExamples
t.id('id'); t.dateTime('createdAt'); t.dateTime('updatedAt'); t.string('email'); t.string('themeName'); t.list.field('webs', { type: 'Web', resolve: (root, _args, context) => context.models.user.webs(root.id), }); }, }); // https://medium.com/workflowgen/graphql-schema-design-the-viewer-field-aeabfacffe72 export const viewer = queryField('viewer', { type: User, nullable: true, resolve: (_root, _args, context) => context.models.user.viewer(), }); // requiredViewer throws, so the app can redirect. export const requiredViewer = queryField('requiredViewer', { type: User, resolve: (_root, _args, co
🌐
GitHub
github.com › graphql-nexus › nexus-result-field
GitHub - graphql-nexus/nexus-result-field
October 18, 2021 - nexus-result-field makes it easy to encode query and mutation operation errors in your schema with Nexus.
Starred by 15 users
Forked by 2 users
Languages   TypeScript 99.3% | JavaScript 0.7% | TypeScript 99.3% | JavaScript 0.7%
🌐
GitHub
github.com › prisma › nexus › issues › 201
queryField for list · Issue #201 · graphql-nexus/nexus
August 19, 2019 - What is de equivalent with queryField for this list query ? const Query = objectType({ name: "Query", definition(t) { t.list.field("posts", { .... I cannot find anything in the docs or examples.... Thank you!
Author   graphql-nexus
🌐
npm
npmjs.com › package › nexus-result-field
nexus-result-field - npm
October 18, 2021 - nexus-result-field makes it easy to encode query and mutation operation errors in your schema with Nexus.
      » npm install nexus-result-field
    
Published   Oct 18, 2021
Version   0.2.1
Author   Jason Kuhrt
🌐
Altium
altium.com › documentation › altium-nexus › working-with-the-query-language
Working with the Query Language | NEXUS Client 5 Technical Documentation
June 9, 2022 - This page provides an introduction to the Query Language in Altium NEXUS and how you can create logical query expressions to target specific design objects within the schematics or PCB. Overviews the Query Builder, Query Helper, and favorite queries
Find elsewhere
🌐
GitHub
github.com › graphql-nexus › nexus-plugin-prisma › issues › 972
New way to define nullable and list in queryField or mutationField? · Issue #972 · graphql-nexus/nexus-plugin-prisma
November 25, 2020 - export const notifications = queryField('notifications', { type: 'Notification', nullable: false, list: true, args: { userId: stringArg(), }, resolve: (parent, { userId }, ctx) => { return ctx.prisma.notification.findMany({ where: { userId, }, }); }, });
Author   graphql-nexus
🌐
npm
npmjs.com › package › nexus-pagination-plugin
nexus-pagination-plugin - npm
// User Type export const User = objectType({ name: 'User', description: 'A User', definition(t) { t.nonNull.id('id'); t.nonNull.string('firstName'); t.nonNull.string('lastName'); }, }); // add paginated users query export const UsersQuery = queryField((t) => { t.paginatedQueryResult('users', { type: 'User', resolve: async (_root, args, ctx) => { const { take, skip } = ctx.paginationParams; const users = await ctx.prisma.user.findMany({ skip, take, }); const usersCount = await ctx.prisma.user.count(); const pageInfo = ctx.calculatePageInfo(usersCount); return { results: users, pageInfo } }, }) })
      » npm install nexus-pagination-plugin
    
Published   Apr 07, 2022
Version   0.1.6
Author   Echobind
🌐
Nexus Schema
nexusjs.org › docs › guides › schema
Schema
Why Nexus? Examples · Guides · Schema · Nullability · Source Types · Abstract Types · Library Authors · Best Practices · Generated Artifacts · API · Introduction · objectType · subscriptionType · unionType · scalarType · interfaceType · enumType · inputObjectType · args · list / nonNull · makeSchema · extendType · mutationField · queryField ·
🌐
Skypack
skypack.dev › view › nexus-validate-plugin
npm:nexus-validate-plugin | Skypack
February 12, 2021 - import { intArg, stringArg, booleanArg, floatArg, idArg, arg, } from 'nexus-validate-plugin' import { objectType, queryField } from '@nexus/schema' import { intArg, stringArg } from 'nexus-validate-plugin' export const User = objectType({ name: 'User', definition(t) { t.int('id', { nullable: false }) t.string('email', { nullable: false }) t.string('name', { nullable: true }) }, }) export const Query = queryField('me', { type: 'Int', validate(root, args, { yup }, info) { // return yup schema and plugin will call schema.validateSync(args) return yup.object({ id: yup.number().min(2).max(3), name: yup.string().min(2).max(3), }) }, args: { id: intArg({ validate({ value, yup }) { // do validation by your self and when throw error plugin will catch it return yup.number().min(2).max(3).validateSync(value) }, }), name: stringArg({ validate({ value, yup }) { // return boolean.
🌐
GitHub
github.com › graphql-nexus › nexus-result-field › blob › main › README.md
nexus-result-field/README.md at main · graphql-nexus/nexus-result-field
nexus-result-field makes it easy to encode query and mutation operation errors in your schema with Nexus.
Author   graphql-nexus
🌐
PalJS
paljs.com › generator › nexus
Nexus GraphQL Integration | Packages | PalJS
A Nexus plugin that provides Prisma integration with automatic field selection, admin schema generation, and GraphQL scalar types.
🌐
Snyk
snyk.io › advisor › nexus › functions › nexus.querytype
How to use the nexus.queryType function in nexus | Snyk
nexus.queryField · nexus.queryType · nexus.scalarType · nexus.stringArg · @graphql-codegen/core 86 / 100 · clear 47 / 100 ·
🌐
Nexus Schema
nexusjs.org › docs › plugins › field-authorize
Field Authorize
The field Authorize Plugin plugin provides a new property on the field config called authorize · It allows us to define field-level authorization to a query:
🌐
Nexus Schema
nexusjs.org › docs › api › args
args
Why Nexus? Examples · Guides · Schema · Nullability · Source Types · Abstract Types · Library Authors · Best Practices · Generated Artifacts · API · Introduction · objectType · subscriptionType · unionType · scalarType · interfaceType · enumType · inputObjectType · args · list / nonNull · makeSchema · extendType · mutationField · queryField ...
🌐
Zach
zach.codes › p › nexus-prisma-is-the-future-of-backend
Nexus + Prisma: the Future of Backend - by Zach Silveira
March 30, 2021 - Setup GraphQL with Nexus + Prisma. Automate code generation, TypeScript generation, and crud resolvers.
🌐
Nexus Schema
nexusjs.org › docs › plugins › query-complexity
Query Complexity
Why Nexus? Examples · Guides · Schema · Nullability · Source Types · Abstract Types · Library Authors · Best Practices · Generated Artifacts · API · Introduction · objectType · subscriptionType · unionType · scalarType · interfaceType · enumType · inputObjectType · args · list / nonNull · makeSchema · extendType · mutationField · queryField ·
🌐
Nexus Schema
nexusjs.org › docs › plugins › connection
Relay Connection - Plugins
The queryField or mutationField helpers may accept a function rather than a field name, which will be shorthand for the query builder: