@codebeast on Twitter
Response
Request
How is the actual process completed?
GET /users/<id>
{
name: John,
age: 25
}
GET /users/<id>/posts
[{
title: Hello,
date: 5s
},
...]
The `/<id>` route could have fetched each user's posts but we are not sure when the client actually needs it.
So if I want just the user id and a list of the user's posts:
Identifier
Type Name
Field(s)
Field Type
Non-Nullable
Directive
Scalar Types | Custom Types | Other Base Types |
---|---|---|
Int | Todo | Query |
String | User | Mutation |
Float | Post | enum |
DateTime | Cart | interface |
Boolean | Animals |