import { useQuery } from 'stook-graphql'
interface User {
userOne: {
_id: string
name: string
gender: string
age: number
}
}
const User = () => {
const { loading, data, error } = useQuery<User>(GET_USER)
if (loading) return <div>loading....</div>
if (error) return <div>error!</div>
return <pre>{JSON.stringify(data, null, 2)}</pre>
}