I have created a new user and the status is showing a green go but when i check the users it isnt showing up why i have tried reloading also also when i edit the user the user just get disappeared all of sudden and not even using relaod am being able to bring them back
to get the user that you created or modified, you need pass the access token, without access token you will get only public data
I have did it bruhh Heres my code
export const httpClient = axios.create({ baseURL:'https://gorest.co.in/public/v2/', headers: { Authorization: access token
} })
export const useCreateUser = ()=>{
const queryClient = useQueryClient()
return useMutation({
mutationFn:(user:UserType)=> httpClient.post(users
,user),
onSuccess:()=> queryClient.invalidateQueries({queryKey:[DataQueryKey.users]})
})
}
Yep got It Gosshhh i gotta start reading moree
Thanks alot Dude ... appreciate the help