Skip to content
Discussion options

You must be logged in to vote

ah wow that works! solution:

const ProfileObject = builder.primsaObject('Profile',...)

profile: t.field({
      args: {
        profileId: t.arg({
          type: 'ID',
          required: true
        })
      },
      select: (args, ctx, nestedSelection)=> ({
        profiles: nestedSelection({
          where: {
             profileId: args.profileId
          },
          take: 1
        }),
      }),
      type: ProfileObject,
      nullable: true,
      resolve: (parent) => parent.profiles?.[0],
    }),

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@dennemark
Comment options

dennemark Nov 4, 2025
Author Sponsor

@dennemark
Comment options

dennemark Nov 4, 2025
Author Sponsor

@hayes
Comment options

hayes Nov 4, 2025
Maintainer

@dennemark
Comment options

dennemark Nov 4, 2025
Author Sponsor

Answer selected by dennemark
@hayes
Comment options

hayes Nov 4, 2025
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants