hydra
hydra-docs
hydra-docs
  • Hydra
  • Hydra CLI
  • Hydra Indexer
  • Hydra Indexer Gateway
  • Hydra Processor
  • Hydra Typegen
  • Overview
    • Query Node Manifest
    • Graphql Queries
    • Pagination
    • Sorting
    • Mappings
      • DatabaseManager
      • SubstrateEvent
    • Schema
      • The Goodies
      • Entities
      • Enums
      • Interfaces
      • Algebraic types
      • Full-text queries
      • Entity Relationships
      • Cross filtering
      • Variant relations
    • Install Hydra
    • Tutorial
    • GraphQL Entity Relationships
    • Architecture
  • Migration to Hydra v2
  • What's new in Hydra v3
Powered by GitBook
On this page

Was this helpful?

  1. Overview
  2. Schema

Enums

Enums are natively supported as described the GraphQL schema spec. Here is an illustrative example:

enum ProposalStatus {
  NONE
  REJECTED
  APPROVED
}

type Proposal @entity {
  status: ProposalStatus
  bond: BigInt!
}
PreviousEntitiesNextInterfaces

Last updated 4 years ago

Was this helpful?