import gql from 'graphql-tag' import { Query } from 'react-apollo' import Interface from './Interface' const INTERFACE_LIST = gql` query INTERFACE_LIST { interfaces { interfaceName workerScript ports { id device interfaceName name description } connections { id device interfaceName } options { name type description values } } } ` const InterfaceList = props => ( {({ data }, loading, error) => { if (!data) return

No interfaces found.

const { interfaces } = data return (

Interface List

{loading ? (

Loading interfaces...

) : ( interfaces && interfaces.map(iface => ) )}
) }}
) export default InterfaceList export { INTERFACE_LIST }