Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Savy011/fullstackopen-exercises. My Exercise Submissions for FullStack Open fullstackopen.com/en
Something went wrong. Try again.
1.1 kB · 61 lines
JavaScript
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162const typeDefs = ` type Book { title: String! author: Author! published: Int! id: ID! genres: [String]! }
type Author { name: String! id: ID! born: Int bookCount: Int! }
type User { username: String! favouriteGenre: String! id: ID! }
type Token { value: String! }
type Query { bookCount: Int! authorCount: Int! allBooks(author: String, genre: String): [Book!]! allAuthors: [Author!]! me: User }
type Mutation { addBook( title: String! published: Int! author: String! genres: [String!]! ): Book! editAuthor( name: String! setBornTo: Int! ): Author createUser( username: String! favouriteGenre: String! ): User login( username: String! password: String! ): Token }
type Subscription { bookAdded: Book! }`
module.exports = typeDefs