graphql-schema-linter icon indicating copy to clipboard operation
graphql-schema-linter copied to clipboard

Error raised while using inline linter configuration

Open vykulakov opened this issue 1 year ago • 1 comments

Code sample:

type Invoice @goModel(model: "package.Invoice"){
    id: UUID!
    number: Int! # lint-disable
}

Error stack trace:

It looks like you may have hit a bug in graphql-schema-linter.
It would be super helpful if you could report this here: https://github.com/cjoudrey/graphql-schema-linter/issues/new
TypeError: Cannot read properties of undefined (reading 'split')
    at parseRulesArg (/usr/local/lib/nodejs/node-v16.19.0-linux-x64/lib/node_modules/graphql-schema-linter/lib/inline_configuration.js:55:16)
    at parseInlineComment (/usr/local/lib/nodejs/node-v16.19.0-linux-x64/lib/node_modules/graphql-schema-linter/lib/inline_configuration.js:41:16)
    at extractInlineConfigs (/usr/local/lib/nodejs/node-v16.19.0-linux-x64/lib/node_modules/graphql-schema-linter/lib/inline_configuration.js:18:27)
    at inlineConfigErrorFilter (/usr/local/lib/nodejs/node-v16.19.0-linux-x64/lib/node_modules/graphql-schema-linter/lib/validator.js:100:72)
    at validateSchemaDefinition (/usr/local/lib/nodejs/node-v16.19.0-linux-x64/lib/node_modules/graphql-schema-linter/lib/validator.js:78:25)
    at run (/usr/local/lib/nodejs/node-v16.19.0-linux-x64/lib/node_modules/graphql-schema-linter/lib/runner.js:68:58)

vykulakov avatar Oct 01 '24 16:10 vykulakov

Seems like a haven't passed any rule name to the directive in the inline configuration.

vykulakov avatar Oct 01 '24 16:10 vykulakov