Skip to content

Run require-id-when-available on FragmentDefinition #1737

@axynos

Description

@axynos

We recently ran into an issue where a missing id field in a selection caused a cryptic error to be thrown in production that caused an incident.

After that incident, I looked into graphql-eslint, specifically the require-id-when-available rule. Turning it on did expose a couple areas where we missed adding id-s, but it does not report any problem on the fragment that caused our incident.

After peeking into the source, I see that it does, in fact, not run on FragmentDefinition.

Would it be possible to also check if ids are included for fields in a fragment definition?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions