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

Avoid "Object types must have fields" warnings. #83

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

myronmarston
Copy link
Collaborator

@myronmarston myronmarston commented Jan 1, 2025

The GraphQL gem, starting in v2.4.5, is issuing warnings about object types with no fields:

Object types must have fields, but Color doesn't have any. Define a field for this type, remove it from your schema, or add `has_no_fields(true)` to its definition.

This will raise an error in a future GraphQL-Ruby version.

This fixes specs that accidentally trigger this warning.

Copy link
Collaborator

@BrianSigafoos-SQ BrianSigafoos-SQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The GraphQL gem, starting in v2.4.5, is issuing warnigs about object types with no fields:

```
Object types must have fields, but Color doesn't have any. Define a field for this type, remove it from your schema, or add `has_no_fields(true)` to its definition.

This will raise an error in a future GraphQL-Ruby version.
```

This fixes spec that accidentally trigger this warning.
@myronmarston myronmarston force-pushed the myron/address-graphql-warnings branch from 7f1390a to 898e4bb Compare January 2, 2025 17:35
@myronmarston myronmarston enabled auto-merge January 2, 2025 17:35
@myronmarston myronmarston merged commit aad51d2 into main Jan 2, 2025
15 checks passed
@myronmarston myronmarston deleted the myron/address-graphql-warnings branch January 2, 2025 17:54
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.

2 participants