1type BlogPost {2 id: ID!3 title: String!4 content: String!5 author: Author!6}78type Author {9 id: ID!10 name: String!11 blogPosts: [BlogPost]12}
> graph generate◌ Generating types◌ Generating Resolvers◌ Generating Components✓ Generation done> graph apply◌ Applying database schema◌ Applying database security policies◌ Applying database triggers and functions✓ Apply done
1const createAuthor =2 async (resolve, src, args, ctx, info) => {3 const authorName = args.name;4 if (authorName === "Grievous") {5 throw new Error(6 "4-handed robots are not accepted here"7 );8 }9 await resolve();10 }1112export default { Mutation: createAuthor };
1export const BlogPostList = (props) => (2 <List {...props}>3 <Item>4 <Text source="id" />5 <Text source="title" />6 <Text source="author.name" />7 </Item>8 </List>9);