how to make graphql request in axios
const data = await axios.post(API_URL, {
query: `mutation updateUserCity($id: Int!, $city: String!) {
updateUserCity(userID: $id, city: $city){
id
name
age
city
knowledge{
language
frameworks
}
}
}`,
variables: {
id: 2,
city: 'Test'
}
}, {
headers: {
'Content-Type': 'application/json'
}
})
Also in JavaScript:
- jquery on input
- nodejs express return image
- onclick timer javascript
- javascript while loop
- js add click listener
- just number regex
- javascript test if it is an array
- Javascript format date / time
- strapi cloudinary how to use
- how to define connection string in appsettings.json
- insert into mongodb node js
- Cannot assign to read only property 'value' of object '[object Object]
- what is foreach method in javascript
- fire off some javascript on page load
- jquery validation errorplacement
- alpine js open outside div
- clear timeout in function js
- set readonly in javascript
- mongoos populate a ref
- javascript get array size
- lodash merge
- decrease touchableopacity in react native
- rxjs mapto vs tap
- angular usehash not working