Guest User

Untitled

a guest
Jan 22nd, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import gql from 'fraql'
  2. import { ListRow } from './ListRow';
  3.  
  4. // this is the whole list
  5. export const List = ({ users }) => (
  6. <ul>
  7. {users.map(user => <ListRow user={user} />)}
  8. </ul>
  9. )
  10.  
  11. // define list data reqs
  12. List.fragments = {
  13. users: gql`
  14. fragment _ on Project {
  15. users(first: 10) {
  16. id
  17. ${ListRow.fragments.user}
  18. }
  19. }`
  20. };
Add Comment
Please, Sign In to add comment