How to call sub-field in delegateToSchema

How to call sub-field in delegateToSchema


0

Schema looks like this:

type Query { 
    userManagement: UserManagementQueries!
}

type UserManagementQueries {
    users(...): UserManagementUsersConnection
}
...

So the query looks like:

query {
  userManagement {
    users(ids: [123, 456])
  }
}

How can I call this with delegateToSchema where I can only set a fieldName? How do I call a "sub"-field?

return info.mergeInfo
    .delegateToSchema({
        schema,
        operation: 'query',
        fieldName: 'users', // <-------
        args: { ids },
        context,
        info,
        transforms: [createSelectionSetAlteringTransform('users', ['id'], null, null)],
    })

Share
Improve this question


Load 7 more related questions


Show fewer related questions

0

Reset to default



Leave a Reply

Your email address will not be published. Required fields are marked *