Skip to content

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
@dotansimha dotansimha requested a review from dimaMachina May 22, 2023 05:25
@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 graphql-hive:master May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

New Rule: Report Non-Null fields in root schema

2 participants