G.apex

  • Docs
  • Tutorials
Docs Menu
  • G.apex Core
    • Parameters
    • Default Value
    • Alias
    • Fragment
    • Variable
    • Directive
  • Editor
  • Methods
    • Global
    • Schema
    • Data Type
    • Resolver
    • Directive

Alias Guide

Alias

Use Aliases

{
    "query": {
        "my_book:book": {
            "@id": "2",
            "name": ""
        },
        "her_book:book": {
            "@id": "3",
            "name": ""
        }
    }
}

Prepend the alias and : before the field to rename the field to the alias, producing results like:

{
    "query": {
        "her_book": {
            "name": "Third Book"
        },
        "my_book": {
            "name": "Second Book"
        }
    }
}

Contribute on Github! Edit this section.