Is there a possibility to define a Graphql request's Key argument as a variable (not it's value)

Hello,
Is there a possibility to somehow influence on Graphql request’s arguments? To be precise, to the Key parameter:

query GetRepos($login: String!, $endCursor: String) {
    user(login: $login) {
      repositories(first: 10, after: $endCursor) {
        nodes {
          name
          description
        }
       }
      }
     }

For example, I need to set with passed variable, whether it sends After or Before key in to repositories query.

Thank you.