Is there any way to compact a String at compile time

Viewed 168

I would like to know if there is any way to compact a String at compile time.

Example: I want to reduce that GraphQL query

val q = """
query {
    contacts {
        firstName
        lastName
        phone
    }
}
"""

to

val q = "query{contacts{firstName,lastName,phone}}"
0 Answers
Related