noRootType
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/noRootType - This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
- Same as
@graphql-eslint/no-root-type
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noRootType": "error" } } }}Description
Section titled “Description”Disallow the usage of specified root types
Prevent the usage of certain root types (e.g. mutation and/or subscription)
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{ "linter": { "rules": { "nursery": { "noRootType": { "options": { "disallow": [ "mutation" ] } } } } }}type Mutation { createUser(input: CreateUserInput!): User!}type Query { users: [User!]!}Options
Section titled “Options”disallow
Section titled “disallow”This required option lists all disallowed root types (e.g. mutation and/or subscription).
The values of the list are case-insensitive.
Default []
{ "linter": { "rules": { "nursery": { "noRootType": { "options": { "disallow": [ "subscription" ] } } } } }}type Subscription { user: User}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.