What is the Lambda signature for a graphql @resolver's UDF that both has 'pagination: true' and accepts arguments?

According to documentation here:

I know that a resolver-UDF for a graphql query signature like this:
pendingInvites: [Invite!] @resolver(paginated: true)

Should have a signature like this:

q.Lambda(
      ['size', 'after', 'before'],
      ...
)

But what if the graphql query is expecting parameters? For instance, what would the signature for a UDF function be in the case of this graphql query:

pendingInvites(active: Boolean!, user: ID!): [Invite!] @resolver(paginated: true)

Now it needs to receive the active and user arguments as well as the 3 pagination-related arguments…

1 Like

The user-defined args go first. So for pendingInvites you should define the UDF like:

q.Lambda(
      ['active', 'user', 'size', 'after', 'before'],
      /* ... */
)
4 Likes