Skip to content

Warnings on well formatted GraphQL files #465

@p-makowski

Description

@p-makowski

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)
------------------------------------------------------------------------------------------------------------------------

Activity

m2-assistant

m2-assistant commented on Sep 13, 2023

@m2-assistant

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

p-makowski commented on Sep 13, 2023

@p-makowski
Author

@magento I am working on this

added 2 commits that reference this issue on Sep 13, 2023
linked a pull request that will close this issue on Sep 14, 2023
added a commit that references this issue on Oct 30, 2023
moved this to Pull Request In Progress in Backlogon Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Pull Request In Progress

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @p-makowski

    Issue actions

      Warnings on well formatted GraphQL files · Issue #465 · magento/magento-coding-standard