import { useQuery } from '@apollo/react-hooks' const Query = ({ children, query, id }) => { const { data, loading, error } = useQuery(query, { variables: { id } }) if (loading) { return (
loading...
Error: {JSON.stringify(error)}
return children({ data }) } export default Query