3.2 GraphQL upiti

Primjeri za različite tipove upita.

Sva polja

{
  customers {
    id
    name
    country
    email
    phone
  }
}

S ograničenjem

{
  customers(first: 10, skip: 0) {
    id
    name
  }
}

S filterom

{
  customers(filter: "Country eq 'Germany'") {
    id
    name
    city
  }
}

Pojedinačni zapis

{
  customersById(id: "ALFKI") {
    id
    name
    orders {
      id
      orderDate
      total
    }
  }
}

Sortiranje

{
  products(orderBy: "Price desc", first: 5) {
    id
    name
    price
  }
}
Zuletzt geändert: 29.01.2026. u 23:32