nalchevanidze / morpheus-graphql-uhh-example

morpheus-graphql-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Morpheus GraphQL Example

Getting Started

  • build app

    stack install 
  • run Server after build succeed.

    uhh-example
  • visit: http://localhost:3000/

  • query:

    {
      deity(id: "morpheus") {
        name
        power
      }
      characters {
        __typename
        ... on Deity {
          name
        }
        ... on Titan {
          name
        }
      }
    }
  • response:

    {
      "data": {
        "deity": {
          "name": "Morpheus",
          "power": [
            "Shapeshifting"
          ]
        },
        "characters": [
          {
            "__typename": "UnknownCreature"
          },
          {
            "__typename": "Deity",
            "name": "Morpheus"
          },
          {
            "__typename": "Titan",
            "name": "Prometheus"
          }
        ]
      }
    }

About

morpheus-graphql-example

License:MIT License


Languages

Language:Haskell 100.0%