Getting Started
Federation
- Federation Compatibility Matrix
- directives
- Event-Driven Federated Subscriptions
CLI (wgc)
- Cosmo CLI
- Essentials
- API Keys
- Namespace
- Subgraph
- Federated Graph
- Monograph
- Router
- Auth
- Operations
- Schema Contracts
- Feature Subgraph
- Feature Flags
- Cosmo MCP Server
Studio
- Cosmo Studio
- Overview Page
- Schema Explorer
- Schema Registry
- Schema Checks
- Schema Contracts
- Overrides
- Changelog
- Playground++
- Graph Documentation
- Compositions
- Analytics
- API Keys
- Migrate from Apollo
- Alerts and notifications
- Graph Access Control
- Cluster Management
- RBAC
- SSO
- SCIM
- Audit Log
- Cosmo AI
- Policies
- Graph Pruning
- Invitations
Router
- Cosmo Router
- Download & Install
- Configuration
- MCP Gateway
- Custom Modules
- Authentication & Authorization
- Subscriptions
- Persisted Queries
- Open Telemetry
- Metrics & Monitoring
- Proxy capabilities
- Traffic shaping
- Storage Providers
- Deployment
- Security
- Development
- Performance Debugging
- Advanced Request Tracing (ART)
- Query Plan
- Event-Driven Federated Subscriptions (EDFS)
- Compliance and Data Management
- Query Batching
- Subgraph Error Propagation
- File Upload
- Access Logs
- Profiling
- Upgrading The Router
Control Plane
Deployments and Hosting
- Cosmo
- Kubernetes
- Terraform
- Docker
- Release Management
- Cosmo Cloud
Linter Rules
Naming Convention
These rules enforce naming conventions.
Field names should always use camelCase.
type User {
First_Name: String
}
Correct:
type User {
firstName: String
}
Type names should always use PascalCase.
type userProject {
id: ID!
}
type UserProject {
id: ID!
}
A type’s name should never be prefixed with ‘Type’.
type TypeUser {
id: ID!
}
type User {
id: ID!
}
A type’s name should never be suffixed with ‘Type’.
type UserType {
id: ID!
}
type User {
id: ID!
}
An input’s name should never be prefixed with ‘Input’.
input InputUser {
id: ID!
}
input UserInput {
id: ID!
}
An input’s name should always be suffixed with ‘Input’.
input User {
id: ID!
}
input UserInput {
id: ID!
}
An enum’s name should never be prefixed with ‘Enum’.
enum EnumUserStatus {
ADMIN
USER
}
enum UserStatus {
ADMIN
USER
}
An enum’s name should never be suffixed with ‘Enum’.
enum UserStatusEnum {
ADMIN
USER
}
enum UserStatus {
ADMIN
USER
}
An interface type’s name should never be prefixed with ‘Interface’.
interface InterfaceUser {
id: ID!
}
interface User {
id: ID!
}
An interface type’s name should never be suffixed with ‘Interface’.
interface UserInterface {
id: ID!
}
interface User {
id: ID!
}
Enum values should always use UPPER_CASE.
enum UserRole {
admin
user
}
enum UserRole {
ADMIN
USER
}
Alphabetical Sort
These rules enforce the arrangement of types, fields and so on in the schema.
Ensures all fields are sorted in alphabetical order.
type User {
lastName: String
firstName: String
}
type User {
firstName: String
lastName: String
}
Ensures all enum values are sorted in alphabetical order.
enum UserRole {
USER
ADMIN
}
enum UserRole {
ADMIN
USER
}
Ensures all definitions are sorted in alphabetical order.
Violation:
type User{
id: ID;
name: String;
}
type Member {
id: ID;
name: String;
}
Correct:
type Member {
id: ID;
name: String;
}
type User{
id: ID;
name: String;
}
Others
Ensures all type definitions are accompanied by a description.
The types include:-
-
ObjectTypeDefinition
-
InterfaceTypeDefinition
-
EnumTypeDefinition
-
ScalarTypeDefinition
-
InputObjectTypeDefinition
-
UnionTypeDefinition
type User {
id: ID!
}
interface Member {
id: ID!
}
# Represents a user in the system
type User {
id: ID!
}
# Represents a member in the system
interface Member {
id: ID!
}
Ensures enum values eliminate duplicates by disallowing case insensitivity.
enum UserRole {
ADMIN
admin
}
enum UserRole {
ADMIN
}
Ensures field names do not include their type’s name as a prefix.
type User {
userId: ID!
}
type User {
id: ID!
}
Requires providing a reason for the @deprecated directive.
type User {
id: ID! @deprecated
}
type User {
id: ID! @deprecated(reason: "No longer in use")
}
Requires providing a deletion date for the @deprecated directive.
type User {
id: ID! @deprecated(reason: "No longer in use")
}
type User {
id: ID! @deprecated(reason: "No longer in use", date: "2023-01-01")
}
Was this page helpful?