GraphQLPlayground

Url to playground: https://localhost:7028/ui/playground

Query:

Get all customers:

{
  customers{
    id,
    firstName,
    lastName,
    orders
    {
      id,
      status
    }   
  }
}

image

Get customer by id

{
  customerById(id: "aeab639a-efd1-4bf2-81d8-0c068f7cc692"){
    id,
    firstName,
    lastName,
    orders
    {
      id,
    	status
    }   
  }
}

image

Get all orders:

{
  orders{
    id,
    status,
    customer
    {
      id,
      firstName,
      lastName
    }
  }
}

image

Get order by id:

{
  orderById(id: "026f0bd5-dfe6-4b77-942c-9ab5aabbd4f6"){
    id,
    status,
    customer
    {
      id,
      firstName,
      lastName
    }
  }
}

image

Mutations (Command)

Create customer:

mutation
{
  createCustomer(firstName: "James", lastName:"Test", notes: "some notes")
  {
    id, 
    firstName,
    lastName,
    notes
  }
}

image