-
Notifications
You must be signed in to change notification settings - Fork 155
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
MC-19366: Adds GraphQL sniffs #141
Conversation
…p version supported by coding standard
@jean-bernard-valentaten thanks, that is significant improvement! Could you please demo it on public architecture meeting magento/architecture#273? I see that some rules are still under discussion magento/architecture#269, so please be aware that we cannot merge it until final decision is made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lenaorobei Please discuss presentation of feature in architecture meeting with Igor Melnykov as he informed me, that it needs not be presented.
I pulled changes and run |
…due to PHP_CodeSniffer uppercasing tokenizer names
…ous output and that arguments could be treated as fields
… in case their name was a keyword
@lenaorobei Thank you for the note, I fixed that issue and a couple of follow up issues |
I run against Magento 2
Please add these cases to the unit tests as well. |
…rsed as expected and would thus lead to false positives
…xpected and would thus lead to false positives
I ran it (GraphQL analysis only!) against Magento 2 CE
|
Please also address that following message appears on |
Fixed in 4d99ee4 |
…kiy-magento-coding-standard-346 [Imported] Fix Issue 340
Sniffing GraphQL schemas was added. The following rules/sniffs were added:
enum
,type
andinterface
names must beUpperCamelCase
type
andinterface
must besnake_case
camelCase
query
andmutation
names must becamelCase
In order to be able to tokenize a GraphQL file, we now make use of the lexer bundled in the package
webonyx/graphql-php
.