0% found this document useful (0 votes)
12 views4 pages

TP 2

Uploaded by

moon sailor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

TP 2

Uploaded by

moon sailor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

a-query {

allUniversities {
id
name
location
year
}
}

b-query {
allUniversities {
id
name
location
year
}
allClasses{
id
name
teacher
room
}
}

c-query {
allUniversities {
id
name
location
year
}
allClasses(sortField: "id", sortOrder: "desc") {
id
name
teacher
room
}
}
d-
query {
allUniversities(filter :{year_lt : 1900}) {
id
name
location
year
}

}
e-
query {
allUniversities(filter :{year_lt :2000 , year_gt: 1900}) {
id
name
location
year
}

}
f-
query {
_allUniversitiesMeta{
count
}
_allClassesMeta{
count
}
_allStudentsMeta{
count
}

}
g-
query {
allStudents(page: 1,perPage: 3){
name
major
}

h.
query {
allUniversities{
name
year
Classes{
name
teacher
}
}

}
i.
query {
allUniversities{
universityname :name
year
Classes{
classname: name
teacher
}
Students{
id
studentsname: name
major

}
j.
query {
Student(id : 3){
id
name
major
}

}
k.
query {
Student(id : 3){
id
name
major
University{
university: name
year
}
Class{
classname : name
}
}

}
2-Mutation
a.
mutation {
createStudent(
name : "soyed eya",
age: 21,
major : "Dsi",
class_id : 1,
university_id: 1

) {
id

name
age
major
class_id
university_id
}

}
b.
mutation {
updateUniversity(id : 4
name : "med school"){
name

}
c.
mutation {
createManyClass(
data: [
{name: "SOA", teacher: "mondher",room: "30", university_id : 2}
{name: "Conception", teacher: "mondher",room: "30", university_id : 2}
]
) {
id
name
teacher
}
}

d.
mutation {
removeStudent(id:9){
id
name
}
}

You might also like