GetUser
GetUserById
GetUserByIdWithPic
GetUserByIdWithoutPic
GetUser2
GetUserById2
GetUserByIdWithPic2
GetUserByIdWithoutPic2
Add new request: multiple
Get -> Users
Get -> User/id:4
Get -> User/id:1
Get -> User/id:3
Get -> User/id:2
Get -> User/id:N
Add new request: multiple
Get -> Users
Multiple -> (Get -> User/id:1, Get -> User/id:2 ... Get -> User/id:N)
Add mask to method
Get -> User/id:1, mask: ('firstName', 'lastName')
Get -> User/id:1
(((((
https://facebook.github.io/graphql/
Graph query language
{
"user": {
"id": 4,
"name": "Vladimir Dashukevich",
"smallPic": "https://cdn.site.io/pic-4-64.jpg",
"bigPic": "https://cdn.site.io/pic-4-1024.jpg"
}
}
{
user(id: 4) {
name
}
}
{
"user": {
"name": "Vladimir Dashukevich"
}
}
query withFragments {
user(id: 4) {
friends(first: 10) {
...friendFields
}
mutualFriends(first: 10) {
...friendFields
}
}
}
fragment friendFields on User {
id
name
profilePic(size: 50)
}
type Person {
name: String
age: Int
picture: Url
}
{
"name": "Mark Zuckerberg",
"age": 30,
"picture": "http://some.cdn/picture.jpg"
}
type Person {
name: String
age: Int
picture: Url
relationship: Person
}
It is standart
http://graphql.org/docs/getting-started/