Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to ignore one or more field names from being affected by a rule? #280

Open
vsimon opened this issue Mar 18, 2021 · 0 comments
Open

Comments

@vsimon
Copy link

vsimon commented Mar 18, 2021

I wanted to try this tool with a file asking:

# Things are in alphabetical order, please keep it this way.  Exceptions being:
#   a. the id field is always the first

type Response  {
    id: Int!
    createdAt: LocalDateTime
    updatedAt: LocalDateTime
}

I noticed the --ignore PR was merged. I tried the arguments:

--rules input-object-fields-sorted-alphabetically --ignore '{"input-object-fields-sorted-alphabetically":["id"]}'
--rules input-object-fields-sorted-alphabetically --ignore '{"input-object-fields-sorted-alphabetically":[".id"]}'
--rules input-object-fields-sorted-alphabetically --ignore '{"input-object-fields-sorted-alphabetically":["Response.id"]}'

but they all resulted in same: The fields of input type Response should be sorted in alphabetical order..

The only thing that works is: --ignore '{"input-object-fields-sorted-alphabetically":["Response"]}' but that would disable it for the whole type.

Wondering if it's possible to always ignore say, just an "id" field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant