cjoudrey/graphql-schema-linter

fields-are-camel-cased/input-object-values-are-camel-cased are not working

Opened this issue · 0 comments

Hi,

The above two rules are not working for my schema.

`

   type Friend{
        id: String,
        firstname: String, 
        lastName: String, 
        gender: Gender, 
        age: Int, 
        email: String, 
        contacts: [Contact]
    }
type Contact{
    firstname: String, 
    lastname: String
}

enum Gender{
    MALE
    FEMALE
    OTHER
}

type Query{
    getFriend(id: ID): Friend
}

input FriendInput{
    id: ID,
    firstname: String, 
    lastname: String, 
    gender: Gender, 
    age: Int,
    email: String, 
    contacts: [ContactInput]
}

input ContactInput{
    firstName: String, 
    lastName: String        
}

type Mutation{
    createFriend(input:FriendInput): Friend
}`

When I run the following command, I get this output:

linter_test % graphql-schema-linter --rules fields-are-camel-cased             



✔ 0 errors detected

For the above schema, I expected firstname and lastname to be throwing a camel case error, but they aren't. Do I need to make any changes to the fields-are-camel-cased file before running the command?