At the moment the alias is added as a method call at the end of the query:
import gql.DSL
def result = DSL.execute(schema) {
query('byYear', [year: '1962']) {
returns(Film) {
title
year
}
alias 'first'
}
query('byYear', [year: '2015']) {
returns {
title
year
bond
}
alias 'last'
}
}
It would be great to use statement labels as query alias. Something like this:
import gql.DSL
def result = DSL.execute(schema) {
first: query('byYear', [year: '1962']) {
returns(Film) {
title
year
}
}
last: query('byYear', [year: '2015']) {
returns {
title
year
bond
}
}
}
At the moment the
alias
is added as a method call at the end of the query:It would be great to use statement labels as query alias. Something like this:
That I think should involve an AST transform.