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

Warnings on well formatted GraphQL files #465

Open
p-makowski opened this issue Sep 13, 2023 · 2 comments · May be fixed by #466
Open

Warnings on well formatted GraphQL files #465

p-makowski opened this issue Sep 13, 2023 · 2 comments · May be fixed by #466
Assignees
Labels
bug Something isn't working Progress: PR created

Comments

@p-makowski
Copy link

Preconditions

The bug is reproducible in custom Magento modules that have schema.graphqls files written in readable manner, so e.g. with new line breaks or indentation.

A rule that those not work well with well formatted files is Magento2.GraphQL.ValidTypeName.NotCamelCaps.

Steps to reproduce

  1. Create a well formatted schema.graphqls file or fix it with Prettier
type CartCampaign
    @doc(
        description: "CartCampaign returns the discount amount set in the quote"
    ) {
    full_discount_amount: Float
}
  1. Run code sniffer
    vendor/bin/phpcs -s schema.graphqls

Expected result

No warnings discovered.

Actual result

------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
  1 | WARNING | Type name "CartCampaign
    |         | " is not in PascalCase format (Magento2.GraphQL.ValidTypeName.NotCamelCaps)
------------------------------------------------------------------------------------------------------------------------
@p-makowski p-makowski added the bug Something isn't working label Sep 13, 2023
@m2-assistant
Copy link

m2-assistant bot commented Sep 13, 2023

Hi @p-makowski. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

@p-makowski
Copy link
Author

@magento I am working on this

p-makowski added a commit to p-makowski/magento-coding-standard that referenced this issue Sep 13, 2023
p-makowski added a commit to p-makowski/magento-coding-standard that referenced this issue Sep 13, 2023
…e type definitions - unit tests adjusted
@fredden fredden linked a pull request Sep 14, 2023 that will close this issue
p-makowski added a commit to p-makowski/magento-coding-standard that referenced this issue Oct 30, 2023
@github-project-automation github-project-automation bot moved this to Pull Request In Progress in Backlog Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Progress: PR created
Projects
Status: Pull Request In Progress
Development

Successfully merging a pull request may close this issue.

1 participant