write a JS function to parse SQL statement to GraphQL