Skip to content

noRootType

biome.json
{
"linter": {
"rules": {
"nursery": {
"noRootType": "error"
}
}
}
}

Disallow the usage of specified root types

Prevent the usage of certain root types (e.g. mutation and/or subscription)

biome.json
{
"linter": {
"rules": {
"nursery": {
"noRootType": {
"options": {
"disallow": [
"mutation"
]
}
}
}
}
}
}
type Mutation {
createUser(input: CreateUserInput!): User!
}
type Query {
users: [User!]!
}

This required option lists all disallowed root types (e.g. mutation and/or subscription). The values of the list are case-insensitive.

Default []

biome.json
{
"linter": {
"rules": {
"nursery": {
"noRootType": {
"options": {
"disallow": [
"subscription"
]
}
}
}
}
}
}
type Subscription {
user: User
}