Advertisement
shopnilSS

Testing

Mar 24th, 2022
1,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  useEffect (() => {
  2.     const body = {
  3.       query: `
  4.          query blogs ($queryCommand: String, $limit: String){
  5.             blogs (
  6.                 queryBy: $queryCommand,
  7.                 dataLimit: $limit
  8.             ) {
  9.                 message
  10.                 status
  11.             }
  12.         }
  13.       `,
  14.       variables: {
  15.         queryCommand: "recent",
  16.         limit: "6"
  17.       }
  18.     }
  19.     axios.post (GqAPI.blog, body)
  20.      .then (data => {
  21.        console.log(data.data)
  22.      })
  23.      .catch (err => {
  24.        console.log(err)
  25.      })
  26.   })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement