Skip to content

Commit

Permalink
fix(graphql): send headers in GraphiQL (#5539)
Browse files Browse the repository at this point in the history
  • Loading branch information
orelus authored Apr 11, 2023
1 parent ee3b9fe commit 1f28efc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Symfony/Bundle/Resources/public/init-graphiql.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ function updateURL() {
history.replaceState(null, null, newSearch);
}

function graphQLFetcher(graphQLParams) {
function graphQLFetcher(graphQLParams, {headers}) {
return fetch(entrypoint, {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
'Content-Type': 'application/json',
...headers
},
body: JSON.stringify(graphQLParams),
credentials: 'include'
Expand Down

0 comments on commit 1f28efc

Please sign in to comment.