WarWithinMe/better-align

add alignment support to @ symbol

sooxt98 opened this issue · 0 comments

# original 

input UpsertMerchantInput {
    id: ID @rules(apply: ["bail", "sometimes", "exists:merchants,id"])
    name: String @rules(apply: ["required_without:input.id", "max:255"])
    description: String @rules(apply: ["required_without:input.id", "max:3000"])
    logo: Upload @rules(apply: ["required_without:input.id", "image"])
    firebase: Upload
    @rules(apply: ["required_without:input.id", "mimetypes:application/json"])
}

# current alignment

input UpsertMerchantInput {
    id         : ID @rules(apply: ["bail", "sometimes", "exists:merchants,id"])
    name       : String @rules(apply: ["required_without:input.id", "max:255"])
    description: String @rules(apply: ["required_without:input.id", "max:3000"])
    logo       : Upload @rules(apply: ["required_without:input.id", "image"])
    firebase   : Upload
    @rules(apply: ["required_without:input.id", "mimetypes:application/json"])
}

# desire 

input UpsertMerchantInput {
    id:          ID     @rules(apply: ["bail","sometimes","exists:merchants,id"])
    name:        String @rules(apply: ["required_without:input.id","max:255"])
    description: String @rules(apply: ["required_without:input.id","max:3000"])
    logo:        Upload @rules(apply: ["required_without:input.id","image"])
    firebase:    Upload @rules(apply: ["required_without:input.id","mimetypes:application/json"])
}

# or
input UpsertMerchantInput {
    id          : ID     @rules(apply: ["bail", "sometimes", "exists:merchants,id"])
    name        : String @rules(apply: ["required_without:input.id", "max:255"])
    description : String @rules(apply: ["required_without:input.id", "max:3000"])
    logo        : Upload @rules(apply: ["required_without:input.id", "image"])
    firebase    : Upload @rules(apply: ["required_without:input.id", "mimetypes:application/json"])
}