Slide 10
Slide 10 text
ίʔυ
LightHouse
type User {
id: ID!
name: String!
email: String
posts: [Post!]! @hasMany
}
type Post {
title: String!
content: String!
author: User @belongsTo
}
type Query {
me: User @auth
posts: [Post!]! @paginate
}
type Mutation {
createPost(
title: String @rules(apply: ["required", "min:2"])
content: String @rules(apply: ["required", "min:12"])
): Post @create
}
ςʔϒϧʹͳΔ