Cannot disable relay-page-info-spec
See original GitHub issuePlease consider the schema below. The comment at the top follows the docs for disabling a rule. When running the linter against that schema, the error A ``PageInfo`` object type is required as per the Relay spec.
is thrown even though the linter is being instructed to ignore it.
# lint-disable relay-page-info-spec
##
# GraphQL Service
# Name: batman-service
# Intent: This service summons batman to fight villans
#
##
""" A hero character. These are the good guys """
type Hero {
enemies: [Villain]
friends: [Hero]
id: ID!
name: String!
}
""" A villain character. These are the bad guys """
type Villain {
enemies: [Hero]
friends: [Villain]
id: ID!
name: String!
}
""" Query Root """
type Query {
""" Summons batman """
summon: Hero
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
GraphQL Cursor Connections Specification - Relay
This specification aims to provide an option for GraphQL clients to consistently handle ... Connection types must have fields named edges and pageInfo...
Read more >Relay Cursor Connections Specification
An object named PageInfo . 2Connection Types. Any type whose name ends in “Connection” is considered by Relay to be a Connection Type....
Read more >Understanding pagination: REST, GraphQL, and Relay
pageInfo lets the client know if there are more pages of data to fetch. In the Relay specification, it doesn't tell you the...
Read more >Relay Connection - Plugins - GraphQL Nexus
The connection plugin provides a new method on the object definition builder, enabling paginated associations between types, following the Relay Connection ...
Read more >How to Handle List inside Connection in Graphql Relay
From the Relay spec: ... Notably, this field cannot return a list. ... your schema must be compliant with the Relay specification.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe the problem is because
lint-disable
does not affect the line it is written on, so the error at1:1
is not silenced by it.https://github.com/cjoudrey/graphql-schema-linter/blob/fb0dd421138a5385de9be783393fd5f684219400/src/validator.js#L141
Small bump on the above issue since the given workaround will not work much longer:
‼ The --only and --except command line options have been deprecated. They will be removed in v1.0.0.