skip to Main Content

Reactjs – Call graphql query from form submit

I have a simple react app like const [shoe, setShoe] = useState('') formSubmit = () => { e.preventDefault() const { data } = useQuery<GetShoeDetailsQuery,GetShoeDetailsQueryVariables>(getShoeDetailsQuery, { variables: { name: String(shoe), }, }) console.log(data) } <form onSubmit={formSubmit}> <input type="text" onChange: (e: {…

VIEW QUESTION
Back To Top
Search