Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const typeDefs = gql`
- type User {
- name: String
- }
- type Book {
- title: String
- author: User
- }
- # ...
- `;
- const resolvers = {
- Book: {
- author: (book) => { /* find user by book.authorId */ }
- }
- /* ... */
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement