3.2 GraphQL poizvedbe

Primeri za različne vrste poizvedb.

Vsa polja

{
  customers {
    id
    name
    country
    email
    phone
  }
}

Z omejitvijo

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

S filtrom

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

Posamezen zapis

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

Razvrščanje

{
  products(orderBy: "Price desc", first: 5) {
    id
    name
    price
  }
}
Zuletzt geändert: dne 29.01.2026 ob 23:30