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

Add require-nullable-result-in-root lint rule #1657

Merged
merged 7 commits into from May 22, 2023

Conversation

nishtahir
Copy link
Contributor

Description

This adds a no-non-null-in-root lint to enforce partial responses which require nullable root elements.

Fixes #1656

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update

Screenshots/Sandbox (if appropriate/relevant):

N/A

How Has This Been Tested?

  • Unit test - packages/plugin/tests/no-non-null-in-root.spec.ts

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Further comments

N/A

@changeset-bot
Copy link

changeset-bot bot commented May 21, 2023

🦋 Changeset detected

Latest commit: c750f0c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-eslint/eslint-plugin Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nishtahir nishtahir changed the title Add no-non-null-in-root lint Add no-non-null-in-root lint rule May 21, 2023
@dimaMachina dimaMachina changed the title Add no-non-null-in-root lint rule Add require-nullable-result-in-root lint rule May 22, 2023
@dimaMachina dimaMachina merged commit 0a571bb into dimaMachina:master May 22, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Rule: Report Non-Null fields in root schema
2 participants