Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

add alignment support to @ symbol #68

Open
sooxt98 opened this issue Sep 16, 2020 · 0 comments
Open

add alignment support to @ symbol #68

sooxt98 opened this issue Sep 16, 2020 · 0 comments

Comments

@sooxt98
Copy link

sooxt98 commented Sep 16, 2020

# 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"])
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant