I have a String variable with GraphQL query. I want to write function which will return this the gql tag. Could you help me to write it. For example:
Input:
let input = `query { employee { id surname } }`;
Output:
let output = gql`query { employee { id surname } }`;
const getTagFromString = (input) => { ????? };
let output = getTagFromString(input);
useQuery(output);
You can write