File.js 502 B

1234567891011121314151617181920212223242526272829
  1. import React from 'react'
  2. import gql from 'graphql-tag'
  3. import { Query } from 'react-apollo'
  4. const QUERY_FILES = gql`
  5. query QUERY_FILES {
  6. id
  7. filename
  8. mimetype
  9. truncated
  10. size
  11. md5
  12. }
  13. `
  14. class File extends React.Component {
  15. render () {
  16. const { id } = this.props
  17. return (
  18. <Query query={QUERY_FILES} variables={{ id }}>
  19. {({ data, error, loading }) => (
  20. <p>Here I expect some files.</p>
  21. )}
  22. </Query>
  23. )
  24. }
  25. }
  26. export default File