Skip to content

Commit 1f28efc

Browse files
authored
fix(graphql): send headers in GraphiQL (#5539)
1 parent ee3b9fe commit 1f28efc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Bundle/Resources/public/init-graphiql.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ function updateURL() {
2525
history.replaceState(null, null, newSearch);
2626
}
2727

28-
function graphQLFetcher(graphQLParams) {
28+
function graphQLFetcher(graphQLParams, {headers}) {
2929
return fetch(entrypoint, {
3030
method: 'post',
3131
headers: {
3232
'Accept': 'application/json',
33-
'Content-Type': 'application/json'
33+
'Content-Type': 'application/json',
34+
...headers
3435
},
3536
body: JSON.stringify(graphQLParams),
3637
credentials: 'include'

0 commit comments

Comments
 (0)