# object example
type Character{
name: String!
appearsIn: [Episode!]!
}
# object name - character
# type of the name field - string & ! indicates its mandatory and cannot be null value
# type of the appearsIn field - list [] and has te episode type, both are mandatory and cannot be a null value
# the type of episode is defined like character
# Graphql Request
{
users {
name
}
}
# Graphql Response
{
"data": {
"users": [
{
"name": "Carmen"
},
{
"name": "Nathan"
}
]
}
}
# Graphql request with arugment
{
user(id: "1000") {
name
}
}