Code
graphql
type Author {
id: ID!
name: String!
bio: String
books: [Book!]!
}
type Book {
id: ID!
title: String!
author: Author!
pages: Int
published: Boolean
}
enum Genre {
FICTION
NON_FICTION
SCIENCE
}
scalar DateTimeDefine types, enums, and scalars.
type Author {
id: ID!
name: String!
bio: String
books: [Book!]!
}
type Book {
id: ID!
title: String!
author: Author!
pages: Int
published: Boolean
}
enum Genre {
FICTION
NON_FICTION
SCIENCE
}
scalar DateTime