'Can I use string variable inside of the GQL query?

Is there anyway I could do some kind of following approach?

const myVar =`
    myFunField
`;

export const MyFragment = gql`
    fragment MyFragment on SomeType {
        MyNode {
          myAnotherField1
          ${myVar}
          myAnotherField2
       }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source