how to add headder in gql call? #698
Unanswered
Subhojit98
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hey i was just using the taddy.org podcast api and i am facing difficulties in the response...even worse not getting the response. and the github exam was not clear about headers .
this is the code ->
const query = gql
{ searchForTerm(term: UI, filterForTypes:PODCASTSERIES,page:1,limitPerPage: 3, sortByDatePublished:LATEST){ searchId podcastSeries{ name imageUrl uuid episodes{ uuid name audioUrl } } } }
const variables = {
}
export const UsefetchLatestPodcasts = async ()=>{
const data = await graphQLClient.request(query)
return data
}
where to add the header in the above code?
headers: {
"X-USER-ID": 7,
"X-API-KEY": "96c5007c18858e86d..."
}
Beta Was this translation helpful? Give feedback.
All reactions