Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 700 Bytes

object-types-have-prefixes.md

File metadata and controls

51 lines (39 loc) · 700 Bytes

Types have descriptions

graphql-schema/object-types-have-prefixes

Rule details

Validates that object types have given prefixes. Used for faux-namespacing to avoid collisions in federated deploys.

Default configuration

{
    "overrides":[
        {
            "rules": {
               "graphql-schema/object-types-have-prefixes": ["error", {"prefixes": ["Org"]}]
            }
        }
    ]
}

Examples

valid prefixes: ["Org", "Team"]

type TeamChart {
  id: String
}

type OrgChart {
  id: String
}

type Team {
  id: String
}

type Org {
  id: String
}

invalid prefixes: ["Org", "Team"]

type Chart {
  id: String
}