Open jcampbell05 opened 3 years ago
Hi @jcampbell05
You can use plain fetch and POST to your graphQL server.
return fetch(API_ENDPOINT, {
method: 'POST',
headers: {
Accepts: 'application/json'
},
body: `
mutation {
regenerateAccessToken(refreshToken: "${refreshToken}")
}
`
});
Nice 😀 I found a work around I can document sometime
Hi @jcampbell05
You can use plain fetch and POST to your graphQL server.
return fetch(API_ENDPOINT, { method: 'POST', headers: { Accepts: 'application/json' }, body: ` mutation { regenerateAccessToken(refreshToken: "${refreshToken}") } ` });
In this case it should be something like:
return fetch(API_ENDPOINT, {
method: 'POST',
credentials: 'include',
headers: {
accept: '*/*',
'content-type': 'application/json',
},
body:
JSON.stringify({
query: `
mutation {
regenerateAccessToken(refreshToken: "${refreshToken}")
}
`
})
});
Is there an example on how to implement this via a Graph QL API ?