DmitryTsepelev / rubocop-graphql

Rubocop extension for enforcing graphql-ruby best practices
MIT License
226 stars 50 forks source link

Enforce visibility #169

Open tomgatzgates opened 2 weeks ago

tomgatzgates commented 2 weeks ago

Would you have any appetite in cops to enforce visibility? checks for types, fields, arguments, mutations and arguments?

It seems that the current approach to visibility is to assume visible unless there's an explicit visible? check returns false. But I can see value in requiring visibility to be set such that it works like an "allow list" instead of a "deny list".

This is something I'm exploring for our own project but if there would be value I can contribute upstream.

DmitryTsepelev commented 2 weeks ago

Hey! Sounds good, but probably we will make it off by default, what do you think? 🙂