• GraphQL.NET
  • Docs
  • GitHub

Aliases

You can provide an alias for a queried field and rename it to anything you want.

{
  empireHero: hero(id: "1") {
    name
  }
  jediHero: hero(id: "2") {
    name
  }
}
Edit this page on GitHub
  • Getting Started
    • Introduction
    • Installation
    • GraphiQL
    • Altair GraphQL
    • Queries
    • Schema Types
    • Custom Scalars
    • Lists and Non-Null
    • Arguments
    • Aliases
    • Fragments
    • Variables
    • Directives
    • Mutations
    • Interfaces
    • Unions
    • Subscriptions
    • Transport
    • Query Validation
    • Query Organization
    • User Context
    • Error Handling
    • Dependency Injection
    • Databases
    • Malicious Queries
    • Object/Field Metadata
    • Field Middleware
    • Metrics
    • Authorization
    • Relay
    • Global Switches
  • Guides
    • Serialization
    • Dataloader
    • Complexity Analyzer
    • Schema Generation
    • Known Issues & FAQ
    • Links
    • Document Caching
  • Analyzers
    • Overview
    • GQL001
    • GQL002
    • GQL003
    • GQL004
    • GQL005
    • GQL006
    • GQL007
    • GQL008
    • GQL009
    • GQL010
    • GQL011
    • GQL012
    • GQL013
    • GQL014
    • GQL015
    • GQL016
    • GQL017
    • GQL018
    • GQL019
    • GQL020
  • Migration Guides
    • Migration Guide [v7 -> v8]
    • Migration Guide [v5 -> v7]
    • Migration Guide [v4 -> v5]
    • Migration Guide [v3 -> v4]
    • Migration Guide [v2 -> v3]
    • Migration Guide [v0.17.x -> v2]
    • Migration Guide [v0.11.0]
    • Migration Guide [v0.8.0]